@Override
  protected void setUp() throws Exception {
    myMainOutput = new TempDirTestFixtureImpl();
    myMainOutput.setUp();
    super.setUp();
    getProject().getComponent(GroovyCompilerLoader.class).projectOpened();
    CompilerManagerImpl.testSetup();

    new WriteCommandAction(getProject()) {
      @Override
      protected void run(Result result) throws Throwable {
        //noinspection ConstantConditions
        CompilerProjectExtension.getInstance(getProject())
            .setCompilerOutputUrl(myMainOutput.findOrCreateDir("out").getUrl());
        if (useJps()) {
          ApplicationManagerEx.getApplicationEx().doNotSave(false);
          CompilerWorkspaceConfiguration.getInstance(getProject()).USE_COMPILE_SERVER = true;

          JavaAwareProjectJdkTableImpl jdkTable = JavaAwareProjectJdkTableImpl.getInstanceEx();
          Sdk internalJdk = jdkTable.getInternalJdk();
          jdkTable.addJdk(internalJdk);
          ModuleRootModificationUtil.setModuleSdk(myModule, internalJdk);
        }
      }
    }.execute();
  }
예제 #2
0
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   myJavaPsiFacade = JavaPsiFacade.getInstance(myModule.getProject());
   myInferredAnnotationsManager = InferredAnnotationsManager.getInstance(myModule.getProject());
   myMessageDigest = MessageDigest.getInstance("MD5");
   setUpDataClasses();
 }