mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
removed setTestMode hack
This commit is contained in:
@@ -56,6 +56,7 @@ import java.util.Arrays;
|
||||
|
||||
public class IdeaApplication {
|
||||
@NonNls public static final String IDEA_IS_INTERNAL_PROPERTY = "idea.is.internal";
|
||||
@NonNls public static final String IDEA_IS_UNIT_TEST = "idea.is.unit.test";
|
||||
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.idea.IdeaApplication");
|
||||
|
||||
@@ -80,7 +81,8 @@ public class IdeaApplication {
|
||||
ourInstance = this;
|
||||
|
||||
myArgs = args;
|
||||
boolean isInternal = Boolean.valueOf(System.getProperty(IDEA_IS_INTERNAL_PROPERTY)).booleanValue();
|
||||
boolean isInternal = Boolean.getBoolean(IDEA_IS_INTERNAL_PROPERTY);
|
||||
boolean isUnitTest = Boolean.getBoolean(IDEA_IS_UNIT_TEST);
|
||||
|
||||
boolean headless = Main.isHeadless();
|
||||
if (!headless) {
|
||||
@@ -99,7 +101,7 @@ public class IdeaApplication {
|
||||
}
|
||||
}
|
||||
|
||||
ApplicationManagerEx.createApplication(isInternal, false, false, false, ApplicationManagerEx.IDEA_APPLICATION, splash);
|
||||
ApplicationManagerEx.createApplication(isInternal, isUnitTest, false, false, ApplicationManagerEx.IDEA_APPLICATION, splash);
|
||||
}
|
||||
|
||||
if (myStarter == null) {
|
||||
|
||||
+1
-12
@@ -15,27 +15,16 @@
|
||||
*/
|
||||
package org.jetbrains.idea.maven.server;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.impl.ApplicationImpl;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public class MavenServerManagerHelper {
|
||||
/** {@link MavenServerManager#collectClassPathAndLibsFolder()} forces maven2 in test mode; we want maven3. */
|
||||
public static MavenServer connectToMaven3Server() throws RemoteException {
|
||||
ApplicationImpl application = (ApplicationImpl)ApplicationManager.getApplication();
|
||||
MavenServerManager msm = MavenServerManager.getInstance(); // do this first, it won't work outside of unit test mode
|
||||
|
||||
msm.cleanup(); // in case we were previously connected to maven2
|
||||
|
||||
boolean oldUnitTestMode = application.isUnitTestMode();
|
||||
application.setUnitTestMode(false);
|
||||
try {
|
||||
return msm.getOrCreateWrappee();
|
||||
}
|
||||
finally {
|
||||
application.setUnitTestMode(oldUnitTestMode);
|
||||
}
|
||||
return msm.getOrCreateWrappee();
|
||||
}
|
||||
|
||||
public static void disconnectFromServer() {
|
||||
|
||||
Reference in New Issue
Block a user