protected void setUp() throws Exception {
   super.setUp();
   if (!initialized) {
     m_sys = getSystemModel("Models");
     ensureAvailableAndLoaded(
         "Models", "Imported Component IF Scope Testing", false, true, "Component Package");
     Ooaofooa componentRoot = modelRoot;
     ensureAvailableAndLoaded("Models", "sdt_test", false, false, "Domain");
     testDomain = Domain_c.DomainInstance(modelRoot);
     modelRoot = componentRoot;
     initialized = true;
   }
   CorePlugin.disableParseAllOnResourceChange();
 }
  @Override
  protected void setUp() throws Exception {
    if (!initialized) delayGlobalUpgrade = true;
    super.setUp();

    if (!initialized) {
      CorePlugin.disableParseAllOnResourceChange();

      // set perspective switch dialog on launch
      DebugUIPlugin.getDefault()
          .getPluginPreferences()
          .setValue(IDebugUIConstants.PLUGIN_ID + ".switch_to_perspective", "always");

      CorePlugin.getDefault()
          .getPluginPreferences()
          .setDefault(BridgePointPreferencesStore.ALLOW_IMPLICIT_COMPONENT_ADDRESSING, true);

      CorePlugin.getDefault()
          .getPluginPreferences()
          .setValue(BridgePointPreferencesStore.SHOW_EVENT_PARAMETERS, true);

      // initialize test model
      final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);

      File sourceProject = new File(m_workspace_path + "../" + projectName);

      TestingUtilities.copyProjectContents(sourceProject, project);

      TestingUtilities.allowJobCompletion();

      TestingUtilities.allowJobCompletion();

      m_sys =
          SystemModel_c.SystemModelInstance(
              Ooaofooa.getDefaultInstance(),
              new ClassQueryInterface_c() {

                public boolean evaluate(Object candidate) {
                  return ((SystemModel_c) candidate).getName().equals(project.getName());
                }
              });

      PersistableModelComponent sys_comp = m_sys.getPersistableComponent();
      sys_comp.loadComponentAndChildren(new NullProgressMonitor());

      CorePlugin.enableParseAllOnResourceChange();

      TestingUtilities.allowJobCompletion();
      while (!ResourcesPlugin.getWorkspace().getRoot().isSynchronized(IProject.DEPTH_INFINITE)) {
        ResourcesPlugin.getWorkspace()
            .getRoot()
            .refreshLocal(IProject.DEPTH_INFINITE, new NullProgressMonitor());
        while (PlatformUI.getWorkbench().getDisplay().readAndDispatch()) ;
      }

      Ooaofooa.setPersistEnabled(true);
      delayGlobalUpgrade = false;

      initialized = true;
    }
  }