TEMPORARY: Allow running IDEA with Kotlin 1.1.1's UAST implementation

This commit is contained in:
Dmitry Jemerov
2017-04-06 15:19:42 +02:00
parent b2f5993e47
commit f15fc2f74d
3 changed files with 12 additions and 3 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -269,7 +269,10 @@ public class ExtensionPointImpl<T> implements ExtensionPoint<T> {
}
catch (Exception e) {
errorHappened = true;
LOG.error(e);
if (!"org.jetbrains.uast.kotlin.KotlinUastLanguagePlugin".equals(adapter.getAssignableToClassName()) &&
!"org.jetbrains.uast.java.JavaUastLanguagePlugin".equals(adapter.getAssignableToClassName())) {
LOG.error(e);
}
}
myExtensionAdapters.remove(adapter);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -277,6 +277,7 @@ public class ExtensionsAreaImpl implements ExtensionsArea {
@NotNull PluginDescriptor descriptor,
@NotNull ExtensionPoint.Kind kind) {
if (hasExtensionPoint(extensionPointName)) {
if (extensionPointName.equals("org.jetbrains.uast.uastLanguagePlugin")) return;
final String message =
"Duplicate registration for EP: " + extensionPointName + ": original plugin " + getExtensionPoint(extensionPointName).getDescriptor().getPluginId() +
", new plugin " + descriptor.getPluginId();
@@ -78,6 +78,11 @@ public class ServiceManagerImpl implements Disposable {
}
}
if ("org.jetbrains.uast.UastContext".equals(descriptor.serviceInterface) &&
picoContainer.getComponentInstance(descriptor.getInterface()) != null) {
return;
}
if (!Extensions.isComponentSuitableForOs(descriptor.os)) {
return;
}