<!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></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Axel,<br>
    <br>
    thanks for this in-depth analysis!<br>
    <br>
    Instead of maintaining two versions of the NestedScopes.tcs I'd
    rather merge the two test classes into one class, since the only
    difference between the tests contained in these classes is that <br>
    <i>TestNestedScopesTCSandMetamodel</i> tests that the usage of TCS
    and metamodel works as intended while the actual IA-relevant rename
    tests are located in TestNestedScopesWithTextBlocks.<br>
    Thus we could avoid to load parser and lexer using a different class
    loaders and also wouldn't have additional effort to keep both TCS
    versions in sync.<br>
    <br>
    I just pushed the corresponding changes to gihub.<br>
    <br>
    Best regards,<br>
    Sebastian<br>
    <br>
    <blockquote style="border: 0px none;"
cite="mid:115E889EC4064A429819C6A9B2805213092396DF67@DEWDFECCR02.wdf.sap.corp"
      type="cite">
      <div style="margin-left: 40px;">
        <hr style="border-width: 1px 0pt 0pt; border-style: dotted none
          none; border-color: rgb(181, 181, 181) -moz-use-text-color
          -moz-use-text-color; height: 1px; margin: 0pt;"
          class="__pbConvHr"><br>
      </div>
      <table style="padding-top: 5px;" class="__pbConvTable">
        <tbody>
          <tr>
            <td valign="top"><img
                src="cid:part1.09060304.01090903@googlemail.com"
                photoaddress="axel.uhl@sap.com" photoname="Uhl, Axel"
                name="compose-unknown-contact.jpg" height="29px"
                width="29px"></td>
            <td style="padding-left: 5px;" valign="top"><a
                moz-do-not-send="true" href="mailto:axel.uhl@sap.com"
                style="color: rgb(0, 136, 204) ! important;
                text-decoration: none ! important;">Uhl, Axel</a><br>
              <font color="#888888">3. Februar 2011 15:04</font></td>
          </tr>
        </tbody>
      </table>
      <div style="color: rgb(136, 136, 136); margin-left: 40px;"
        __pbrmquotes="true" class="__pbConvBody"><br>
        <div>Hi Sebastian,<br>
          <br>
          it seems the problem you were having with the two tests
          failing when executed in a suite instead of separately is
          related to you using the same language definition with the
          same name in two subsequent distinct test cases. I copied
          NestedScopes.tcs to NestedScopes2.tcs and renamed the language
          defined inside, then adjusted the second test case that
          previously used NestedScopes.tcs, too. Now all tests are green
          for me locally.<br>
          <br>
          I suppose the following happened: when parsing the language
          definition, a transient resource containing the mapping
          definition was created. The parser generated produced a parser
          class which got compiled. The package/name for this class is
          derived from the language name. When the second test case is
          run, the same language definition is used again to produce
          another mapping / parser combination. I assume the mapping
          ended up in a new transient resource as another copy. The
          parser may have gotten written again to the generationTemp
          folder, overwriting the previously generated parser / lexer
          files. And even though the compiler may have produced a new
          copy of the .class files, I don't assume the class loader
          would have loaded those new copies again because it still had
          the old copy loaded.<br>
          <br>
          This would even have been OK from a language / parsing
          perspective since the language definition hasn't changed in
          between. However, since the parser contains the URIs of the
          mapping elements and the mapping was re-created / re-loaded
          with a new transient resource, parser and mapping are out of
          sync, and the parser now can't find the mapping elements
          anymore. This also explains why it works if the failing test
          is executed in isolation.<br>
          <br>
          I pushed the change to github and hope this will "blueify" the
          master. We should probably keep this in mind when constructing
          test cases in the future. If you find a good, robust way to
          re-use the same language definition, e.g., by trying to use a
          separate class loader for loading the parser and lexer class,
          then that's fine, too.<br>
          <br>
          Best,<br>
          -- Axel<br>
        </div>
      </div>
    </blockquote>
  </body>
</html>