Skip to content

Commit

Permalink
platform 193.3793.14: com.intellij.ide.Bootstrap was inlined
Browse files Browse the repository at this point in the history
fe17670b: Bootstrap class was inlined. Reuse directly com.intellij.idea.Main instead of jetbrains.mps.MPSMainImpl. Will need to move caches invalidation from MPSMainImpl to some other class.

f61dfc5e: there is no more boot.jar in distribution - remove from startup.iml
  • Loading branch information
victor-matchenko committed Oct 9, 2019
1 parent 4079250 commit 7115978
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
14 changes: 4 additions & 10 deletions startup/src/jetbrains/mps/Launcher.java
Expand Up @@ -15,23 +15,17 @@
*/
package jetbrains.mps;

import com.intellij.ide.Bootstrap;
import com.intellij.idea.Main;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.util.SystemInfo;
import jetbrains.mps.util.ClassPathReader;
import jetbrains.mps.util.ClassType;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;

public class Launcher {
public static void main(String[] args) throws Exception {
LinkedHashMap<String, Long> startupTimings = new LinkedHashMap<>();
startupTimings.put("startup begin", System.nanoTime());

String mpsInternal = System.getProperty("mps.internal");
System.setProperty("idea.is.internal", mpsInternal != null ? mpsInternal : "false");

Expand All @@ -44,7 +38,7 @@ public static void main(String[] args) throws Exception {
}
}
System.setProperty("idea.additional.classpath", getAdditionalMPSClasspathString());
Bootstrap.main(args, "jetbrains.mps.MPSMainImpl", "start", startupTimings);
Main.main(args);
}

private static String getFsNotifierDir() {
Expand All @@ -65,7 +59,7 @@ private static String getFsNotifierName() {
} else if (SystemInfo.isMac) {
return "fsnotifier";
} else if (SystemInfo.isLinux) {
return SystemInfo.isAMD64 ? "fsnotifier64" : "fsnotifier";
return SystemInfo.is64Bit ? "fsnotifier64" : "fsnotifier";
}

return null;
Expand All @@ -83,7 +77,7 @@ private static String getAdditionalMPSClasspathString() {
private static List<String> getAdditionalMPSClasspath() {
List<String> result = new ArrayList<>();
// we're probably running from the sources, let's add the class dirs to the classpath
Class<Bootstrap> clazz = Bootstrap.class;
Class<Main> clazz = Main.class;
String self = PathManager.getResourceRoot(clazz, "/" + clazz.getName().replace('.', '/') + ".class");
assert self != null;
File selfRoot = new File(self).getAbsoluteFile();
Expand Down
1 change: 0 additions & 1 deletion startup/startup.iml
Expand Up @@ -13,7 +13,6 @@
<library name="idea-startup">
<CLASSES>
<root url="jar://$MODULE_DIR$/../lib/util.jar!/" />
<root url="jar://$MODULE_DIR$/../lib/boot.jar!/" />
<root url="jar://$MODULE_DIR$/../lib/bootstrap.jar!/" />
<root url="jar://$MODULE_DIR$/../lib/trove4j.jar!/" />
</CLASSES>
Expand Down

0 comments on commit 7115978

Please sign in to comment.