move mock jdk 1.7 to community/java
authoranna <anna.kozlova@jetbrains.com>
Tue, 20 Apr 2010 10:10:20 +0000 (14:10 +0400)
committeranna <anna.kozlova@jetbrains.com>
Tue, 20 Apr 2010 10:10:20 +0000 (14:10 +0400)
java/java-impl/src/com/intellij/openapi/projectRoots/impl/JavaSdkImpl.java
java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java
java/mockJDK-1.7/jre/lib/annotations.jar [new file with mode: 0644]
java/mockJDK-1.7/jre/lib/rt.jar [new file with mode: 0644]
java/mockJDK-1.7/lib/jsp-api.jar [new file with mode: 0644]
java/mockJDK-1.7/lib/servlet-api.jar [new file with mode: 0644]
java/mockJDK-1.7/src.zip [new file with mode: 0644]

index 0530eb76420af15731e68fb26d01f350de79eb0d..1c957a79cfaf3f88d0da17bfc4c7f8048fc4dee9 100644 (file)
@@ -302,9 +302,13 @@ public class JavaSdkImpl extends JavaSdk {
     return createMockJdk(jdkHome, versionName, getInstance());
   }
   
-  public static Sdk getMockJdk17(@NonNls String versionName) {
-    String jdkHome = PathManager.getHomePath() + File.separator + "mockJDK-1.7";
-    return createMockJdk(jdkHome, versionName, getInstance());
+  public static Sdk getMockJdk17() {
+    File mockJdkCEPath = new File(PathManager.getHomePath(), "java/mockJDK-1.7");
+    if (mockJdkCEPath.exists()) {
+      return createMockJdk(mockJdkCEPath.getPath(), "java 1.7", getInstance());
+    }
+    mockJdkCEPath = new File(PathManager.getHomePath(), "community/java/mockJDK-1.7");
+    return createMockJdk(mockJdkCEPath.getPath(), "java 1.7", getInstance());
   }
 
   private static Sdk createMockJdk(String jdkHome, final String versionName, JavaSdk javaSdk) {
index 7e6b61327d867cccdc824a321ecbe1a8c55e8c32..fc1b71efd772e33fedba7cb9c1af253af7ac04f3 100644 (file)
@@ -226,6 +226,6 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
   }
   @Override
    protected Sdk getProjectJDK() {
-    return JavaSdkImpl.getMockJdk17("java 1.7");
+    return JavaSdkImpl.getMockJdk17();
   }
 }
diff --git a/java/mockJDK-1.7/jre/lib/annotations.jar b/java/mockJDK-1.7/jre/lib/annotations.jar
new file mode 100644 (file)
index 0000000..5de6780
Binary files /dev/null and b/java/mockJDK-1.7/jre/lib/annotations.jar differ
diff --git a/java/mockJDK-1.7/jre/lib/rt.jar b/java/mockJDK-1.7/jre/lib/rt.jar
new file mode 100644 (file)
index 0000000..fdbd1eb
Binary files /dev/null and b/java/mockJDK-1.7/jre/lib/rt.jar differ
diff --git a/java/mockJDK-1.7/lib/jsp-api.jar b/java/mockJDK-1.7/lib/jsp-api.jar
new file mode 100644 (file)
index 0000000..95832ba
Binary files /dev/null and b/java/mockJDK-1.7/lib/jsp-api.jar differ
diff --git a/java/mockJDK-1.7/lib/servlet-api.jar b/java/mockJDK-1.7/lib/servlet-api.jar
new file mode 100644 (file)
index 0000000..bc0dea0
Binary files /dev/null and b/java/mockJDK-1.7/lib/servlet-api.jar differ
diff --git a/java/mockJDK-1.7/src.zip b/java/mockJDK-1.7/src.zip
new file mode 100644 (file)
index 0000000..4ac79dc
Binary files /dev/null and b/java/mockJDK-1.7/src.zip differ