mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
reduce dependency on CGLIB
GitOrigin-RevId: 5c59ba6aac4113d14c50260c4a58bc7d45249338
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d4266f30ab
commit
f8b4ecb14f
18
.idea/libraries/CGLIB.xml
generated
18
.idea/libraries/CGLIB.xml
generated
@@ -1,18 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="CGLIB" type="repository">
|
|
||||||
<properties maven-id="cglib:cglib-nodep:3.3.0">
|
|
||||||
<verification>
|
|
||||||
<artifact url="file://$MAVEN_REPOSITORY$/cglib/cglib-nodep/3.3.0/cglib-nodep-3.3.0.jar">
|
|
||||||
<sha256sum>3366d2c88fb576e486d830f521184e8f1839f8c15dcd2151a3f6e1f62b0b37a0</sha256sum>
|
|
||||||
</artifact>
|
|
||||||
</verification>
|
|
||||||
</properties>
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib-nodep/3.3.0/cglib-nodep-3.3.0.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC />
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib-nodep/3.3.0/cglib-nodep-3.3.0-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
@@ -855,6 +855,7 @@
|
|||||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/intellij.kotlin.plugin.community.main.iml" filepath="$PROJECT_DIR$/plugins/kotlin/intellij.kotlin.plugin.community.main.iml" />
|
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/intellij.kotlin.plugin.community.main.iml" filepath="$PROJECT_DIR$/plugins/kotlin/intellij.kotlin.plugin.community.main.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/plugins/laf/macos/intellij.laf.macos.iml" filepath="$PROJECT_DIR$/plugins/laf/macos/intellij.laf.macos.iml" />
|
<module fileurl="file://$PROJECT_DIR$/plugins/laf/macos/intellij.laf.macos.iml" filepath="$PROJECT_DIR$/plugins/laf/macos/intellij.laf.macos.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/plugins/laf/win10/intellij.laf.win10.iml" filepath="$PROJECT_DIR$/plugins/laf/win10/intellij.laf.win10.iml" />
|
<module fileurl="file://$PROJECT_DIR$/plugins/laf/win10/intellij.laf.win10.iml" filepath="$PROJECT_DIR$/plugins/laf/win10/intellij.laf.win10.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/platform/libraries/cglib/intellij.libraries.cglib.iml" filepath="$PROJECT_DIR$/platform/libraries/cglib/intellij.libraries.cglib.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/platform/libraries/grpc/intellij.libraries.grpc.iml" filepath="$PROJECT_DIR$/platform/libraries/grpc/intellij.libraries.grpc.iml" />
|
<module fileurl="file://$PROJECT_DIR$/platform/libraries/grpc/intellij.libraries.grpc.iml" filepath="$PROJECT_DIR$/platform/libraries/grpc/intellij.libraries.grpc.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/plugins/lombok/intellij.lombok.iml" filepath="$PROJECT_DIR$/plugins/lombok/intellij.lombok.iml" />
|
<module fileurl="file://$PROJECT_DIR$/plugins/lombok/intellij.lombok.iml" filepath="$PROJECT_DIR$/plugins/lombok/intellij.lombok.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/plugins/lombok/generated/intellij.lombok.generated.iml" filepath="$PROJECT_DIR$/plugins/lombok/generated/intellij.lombok.generated.iml" />
|
<module fileurl="file://$PROJECT_DIR$/plugins/lombok/generated/intellij.lombok.generated.iml" filepath="$PROJECT_DIR$/plugins/lombok/generated/intellij.lombok.generated.iml" />
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ object CommunityLibraryLicenses {
|
|||||||
url = "https://github.com/ben-manes/caffeine")
|
url = "https://github.com/ben-manes/caffeine")
|
||||||
.apache("https://github.com/ben-manes/caffeine/blob/master/LICENSE")
|
.apache("https://github.com/ben-manes/caffeine/blob/master/LICENSE")
|
||||||
.suppliedByPersons("Ben Manes"),
|
.suppliedByPersons("Ben Manes"),
|
||||||
LibraryLicense(name = "CGLib", libraryName = "CGLIB", url = "https://github.com/cglib/cglib/")
|
LibraryLicense(name = "CGLib", libraryName = "cglib", url = "https://github.com/cglib/cglib/")
|
||||||
.apache("https://github.com/cglib/cglib/blob/master/LICENSE")
|
.apache("https://github.com/cglib/cglib/blob/master/LICENSE")
|
||||||
.suppliedByPersons("cglib project contributors"),
|
.suppliedByPersons("cglib project contributors"),
|
||||||
LibraryLicense(name = "classgraph", libraryName = "classgraph", license = "codehaus",
|
LibraryLicense(name = "classgraph", libraryName = "classgraph", license = "codehaus",
|
||||||
|
|||||||
36
platform/libraries/cglib/intellij.libraries.cglib.iml
Normal file
36
platform/libraries/cglib/intellij.libraries.cglib.iml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module-library" exported="">
|
||||||
|
<library name="cglib" type="repository">
|
||||||
|
<properties include-transitive-deps="false" maven-id="cglib:cglib-nodep:3.3.0">
|
||||||
|
<verification>
|
||||||
|
<artifact url="file://$MAVEN_REPOSITORY$/cglib/cglib-nodep/3.3.0/cglib-nodep-3.3.0.jar">
|
||||||
|
<sha256sum>3366d2c88fb576e486d830f521184e8f1839f8c15dcd2151a3f6e1f62b0b37a0</sha256sum>
|
||||||
|
</artifact>
|
||||||
|
</verification>
|
||||||
|
</properties>
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib-nodep/3.3.0/cglib-nodep-3.3.0.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES>
|
||||||
|
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib-nodep/3.3.0/cglib-nodep-3.3.0-sources.jar!/" />
|
||||||
|
</SOURCES>
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module" module-name="intellij.platform.util.base" />
|
||||||
|
<orderEntry type="module" module-name="intellij.platform.util.rt" />
|
||||||
|
<orderEntry type="module" module-name="intellij.platform.util" />
|
||||||
|
<orderEntry type="module" module-name="intellij.platform.core" />
|
||||||
|
<orderEntry type="module" module-name="intellij.platform.core.impl" />
|
||||||
|
<orderEntry type="library" name="fastutil-min" level="project" />
|
||||||
|
<orderEntry type="module" module-name="intellij.platform.util.classLoader" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
1
platform/libraries/cglib/readme.md
Normal file
1
platform/libraries/cglib/readme.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Not yet a product module as XML has not yet been extracted from the core.
|
||||||
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package net.sf.cglib.core;
|
package net.sf.cglib.core;
|
||||||
|
|
||||||
import com.intellij.reference.SoftReference;
|
|
||||||
import net.sf.cglib.asm.$ClassReader;
|
import net.sf.cglib.asm.$ClassReader;
|
||||||
|
|
||||||
import java.lang.ref.Reference;
|
import java.lang.ref.Reference;
|
||||||
@@ -201,7 +200,7 @@ implements ClassGenerator
|
|||||||
source.cache.put(loader, cache2);
|
source.cache.put(loader, cache2);
|
||||||
} else if (useCache) {
|
} else if (useCache) {
|
||||||
Reference ref = (Reference)cache2.get(key);
|
Reference ref = (Reference)cache2.get(key);
|
||||||
gen = (Class) SoftReference.dereference(ref);
|
gen = ref == null ? null : (Class) ref.get();
|
||||||
}
|
}
|
||||||
if (gen == null) {
|
if (gen == null) {
|
||||||
AbstractClassGenerator save = CURRENT.get();
|
AbstractClassGenerator save = CURRENT.get();
|
||||||
@@ -579,7 +579,7 @@ public final class AdvancedEnhancer extends AbstractClassGenerator
|
|||||||
*/
|
*/
|
||||||
private static void filterConstructors(Class<?> sc, List<Constructor<?>> constructors) {
|
private static void filterConstructors(Class<?> sc, List<Constructor<?>> constructors) {
|
||||||
CollectionUtils.filter(constructors, new VisibilityPredicate(sc, true));
|
CollectionUtils.filter(constructors, new VisibilityPredicate(sc, true));
|
||||||
if (constructors.size() == 0) {
|
if (constructors.isEmpty()) {
|
||||||
throw new IllegalArgumentException("No visible constructors in " + sc);
|
throw new IllegalArgumentException("No visible constructors in " + sc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package net.sf.cglib.proxy;
|
package net.sf.cglib.proxy;
|
||||||
|
|
||||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package net.sf.cglib.proxy;
|
package net.sf.cglib.proxy;
|
||||||
|
|
||||||
import net.sf.cglib.core.Block;
|
import net.sf.cglib.core.Block;
|
||||||
@@ -35,7 +35,6 @@
|
|||||||
<orderEntry type="module" module-name="intellij.platform.ide" exported="" />
|
<orderEntry type="module" module-name="intellij.platform.ide" exported="" />
|
||||||
<orderEntry type="library" name="commons-codec" level="project" />
|
<orderEntry type="library" name="commons-codec" level="project" />
|
||||||
<orderEntry type="library" name="OroMatcher" level="project" />
|
<orderEntry type="library" name="OroMatcher" level="project" />
|
||||||
<orderEntry type="library" name="CGLIB" level="project" />
|
|
||||||
<orderEntry type="module" module-name="intellij.platform.lang" />
|
<orderEntry type="module" module-name="intellij.platform.lang" />
|
||||||
<orderEntry type="library" name="jna" level="project" />
|
<orderEntry type="library" name="jna" level="project" />
|
||||||
<orderEntry type="library" name="winp" level="project" />
|
<orderEntry type="library" name="winp" level="project" />
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ import com.intellij.util.SystemProperties
|
|||||||
import com.intellij.util.containers.WeakList
|
import com.intellij.util.containers.WeakList
|
||||||
import com.intellij.util.messages.impl.MessageBusEx
|
import com.intellij.util.messages.impl.MessageBusEx
|
||||||
import com.intellij.util.ref.GCWatcher
|
import com.intellij.util.ref.GCWatcher
|
||||||
import net.sf.cglib.core.ClassNameReader
|
|
||||||
import java.awt.KeyboardFocusManager
|
import java.awt.KeyboardFocusManager
|
||||||
import java.awt.Window
|
import java.awt.Window
|
||||||
import java.nio.channels.FileChannel
|
import java.nio.channels.FileChannel
|
||||||
@@ -556,7 +555,6 @@ object DynamicPlugins {
|
|||||||
ThrowableInterner.clearInternedBacktraces()
|
ThrowableInterner.clearInternedBacktraces()
|
||||||
IdeaLogger.ourErrorsOccurred = null // ensure we don't have references to plugin classes in exception stacktraces
|
IdeaLogger.ourErrorsOccurred = null // ensure we don't have references to plugin classes in exception stacktraces
|
||||||
clearTemporaryLostComponent()
|
clearTemporaryLostComponent()
|
||||||
clearCglibStopBacktrace()
|
|
||||||
|
|
||||||
if (app.isUnitTestMode && pluginDescriptor.pluginClassLoader !is PluginClassLoader) {
|
if (app.isUnitTestMode && pluginDescriptor.pluginClassLoader !is PluginClassLoader) {
|
||||||
classLoaderUnloaded = true
|
classLoaderUnloaded = true
|
||||||
@@ -948,18 +946,6 @@ private fun hideTooltip() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun clearCglibStopBacktrace() {
|
|
||||||
val field = ReflectionUtil.getDeclaredField(ClassNameReader::class.java, "EARLY_EXIT")
|
|
||||||
if (field != null) {
|
|
||||||
try {
|
|
||||||
ThrowableInterner.clearBacktrace((field[null] as Throwable))
|
|
||||||
}
|
|
||||||
catch (e: Throwable) {
|
|
||||||
LOG.info(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun clearNewFocusOwner() {
|
private fun clearNewFocusOwner() {
|
||||||
val field = ReflectionUtil.getDeclaredField(KeyboardFocusManager::class.java, "newFocusOwner")
|
val field = ReflectionUtil.getDeclaredField(KeyboardFocusManager::class.java, "newFocusOwner")
|
||||||
if (field != null) {
|
if (field != null) {
|
||||||
|
|||||||
@@ -67,7 +67,6 @@
|
|||||||
<orderEntry type="module" module-name="intellij.properties.psi.impl" />
|
<orderEntry type="module" module-name="intellij.properties.psi.impl" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.ide.util.io" />
|
<orderEntry type="module" module-name="intellij.platform.ide.util.io" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.ide.util.netty" />
|
<orderEntry type="module" module-name="intellij.platform.ide.util.netty" />
|
||||||
<orderEntry type="library" name="CGLIB" level="project" />
|
|
||||||
<orderEntry type="module" module-name="intellij.platform.boot" />
|
<orderEntry type="module" module-name="intellij.platform.boot" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.util.text.matching" />
|
<orderEntry type="module" module-name="intellij.platform.util.text.matching" />
|
||||||
<orderEntry type="module" module-name="intellij.java.impl.refactorings" />
|
<orderEntry type="module" module-name="intellij.java.impl.refactorings" />
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
<orderEntry type="module" module-name="intellij.properties" />
|
<orderEntry type="module" module-name="intellij.properties" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.core.ui" />
|
<orderEntry type="module" module-name="intellij.platform.core.ui" />
|
||||||
<orderEntry type="module" module-name="intellij.properties.psi.impl" />
|
<orderEntry type="module" module-name="intellij.properties.psi.impl" />
|
||||||
<orderEntry type="library" name="CGLIB" level="project" />
|
|
||||||
<orderEntry type="module" module-name="intellij.devkit.themes" scope="TEST" />
|
<orderEntry type="module" module-name="intellij.devkit.themes" scope="TEST" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.ide.util.io" scope="TEST" />
|
<orderEntry type="module" module-name="intellij.platform.ide.util.io" scope="TEST" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.util.ui" scope="TEST" />
|
<orderEntry type="module" module-name="intellij.platform.util.ui" scope="TEST" />
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="module" module-name="intellij.xml.dom" exported="" />
|
<orderEntry type="module" module-name="intellij.xml.dom" exported="" />
|
||||||
<orderEntry type="library" name="CGLIB" level="project" />
|
|
||||||
<orderEntry type="module" module-name="intellij.xml.impl" />
|
<orderEntry type="module" module-name="intellij.xml.impl" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.util" />
|
<orderEntry type="module" module-name="intellij.platform.util" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.ide" />
|
<orderEntry type="module" module-name="intellij.platform.ide" />
|
||||||
@@ -19,6 +18,7 @@
|
|||||||
<orderEntry type="module" module-name="intellij.platform.resources" />
|
<orderEntry type="module" module-name="intellij.platform.resources" />
|
||||||
<orderEntry type="library" name="fastutil-min" level="project" />
|
<orderEntry type="library" name="fastutil-min" level="project" />
|
||||||
<orderEntry type="module" module-name="intellij.platform.core.ui" />
|
<orderEntry type="module" module-name="intellij.platform.core.ui" />
|
||||||
|
<orderEntry type="module" module-name="intellij.libraries.cglib" />
|
||||||
</component>
|
</component>
|
||||||
<component name="copyright">
|
<component name="copyright">
|
||||||
<Base>
|
<Base>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package com.intellij.util.xml.impl;
|
package com.intellij.util.xml.impl;
|
||||||
|
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
@@ -45,7 +45,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class DomInvocationHandler extends UserDataHolderBase implements InvocationHandler, DomElement {
|
public abstract class DomInvocationHandler extends UserDataHolderBase implements DomElement {
|
||||||
private static final Logger LOG = Logger.getInstance(DomInvocationHandler.class);
|
private static final Logger LOG = Logger.getInstance(DomInvocationHandler.class);
|
||||||
public static final Method ACCEPT_METHOD = ReflectionUtil.getMethod(DomElement.class, "accept", DomElementVisitor.class);
|
public static final Method ACCEPT_METHOD = ReflectionUtil.getMethod(DomElement.class, "accept", DomElementVisitor.class);
|
||||||
public static final Method ACCEPT_CHILDREN_METHOD = ReflectionUtil.getMethod(DomElement.class, "acceptChildren", DomElementVisitor.class);
|
public static final Method ACCEPT_CHILDREN_METHOD = ReflectionUtil.getMethod(DomElement.class, "acceptChildren", DomElementVisitor.class);
|
||||||
@@ -501,7 +501,7 @@ public abstract class DomInvocationHandler extends UserDataHolderBase implements
|
|||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
implementation = (Class<? extends DomElement>)rawType;
|
implementation = (Class<? extends DomElement>)rawType;
|
||||||
}
|
}
|
||||||
myProxy = proxy = AdvancedProxy.createProxy(this, implementation, isInterface ? new Class[]{rawType} : ArrayUtil.EMPTY_CLASS_ARRAY);
|
myProxy = proxy = AdvancedProxy.createProxy(invocationHandler, implementation, isInterface ? new Class[]{rawType} : ArrayUtil.EMPTY_CLASS_ARRAY);
|
||||||
}
|
}
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
@@ -627,15 +627,7 @@ public abstract class DomInvocationHandler extends UserDataHolderBase implements
|
|||||||
return new AttributeChildInvocationHandler(evaluatedXmlName, description, myManager, new VirtualDomParentStrategy(this), null);
|
return new AttributeChildInvocationHandler(evaluatedXmlName, description, myManager, new VirtualDomParentStrategy(this), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private final InvocationHandler invocationHandler = new MyInvocationHandler();
|
||||||
public final @Nullable Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
|
||||||
try {
|
|
||||||
return findInvocation(method).invoke(this, args);
|
|
||||||
}
|
|
||||||
catch (InvocationTargetException ex) {
|
|
||||||
throw ex.getTargetException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private @NotNull Invocation findInvocation(Method method) {
|
private @NotNull Invocation findInvocation(Method method) {
|
||||||
Invocation invocation = myAccessorInvocations.get(method);
|
Invocation invocation = myAccessorInvocations.get(method);
|
||||||
@@ -862,5 +854,21 @@ public abstract class DomInvocationHandler extends UserDataHolderBase implements
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return myChildDescription.hashCode();
|
return myChildDescription.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final class MyInvocationHandler implements InvocationHandler {
|
||||||
|
DomInvocationHandler getDomInvocationHandler() {
|
||||||
|
return DomInvocationHandler.this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||||
|
try {
|
||||||
|
return findInvocation(method).invoke(DomInvocationHandler.this, args);
|
||||||
|
}
|
||||||
|
catch (InvocationTargetException ex) {
|
||||||
|
throw ex.getTargetException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package com.intellij.util.xml.impl;
|
package com.intellij.util.xml.impl;
|
||||||
|
|
||||||
import com.intellij.ide.highlighter.DomSupportEnabled;
|
import com.intellij.ide.highlighter.DomSupportEnabled;
|
||||||
@@ -226,19 +226,25 @@ public final class DomManagerImpl extends DomManager implements Disposable {
|
|||||||
if (proxy instanceof DomFileElement) {
|
if (proxy instanceof DomFileElement) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (proxy instanceof DomInvocationHandler) {
|
if (proxy instanceof DomInvocationHandler h) {
|
||||||
return (DomInvocationHandler)proxy;
|
return h;
|
||||||
}
|
}
|
||||||
final InvocationHandler handler = AdvancedProxy.getInvocationHandler(proxy);
|
|
||||||
|
InvocationHandler handler = AdvancedProxy.getInvocationHandler(proxy);
|
||||||
if (handler instanceof StableInvocationHandler) {
|
if (handler instanceof StableInvocationHandler) {
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
final DomElement element = ((StableInvocationHandler<DomElement>)handler).getWrappedElement();
|
DomElement element = ((StableInvocationHandler<DomElement>)handler).getWrappedElement();
|
||||||
return element == null ? null : getDomInvocationHandler(element);
|
return element == null ? null : getDomInvocationHandler(element);
|
||||||
}
|
}
|
||||||
if (handler instanceof DomInvocationHandler) {
|
else if (handler instanceof DomInvocationHandler) {
|
||||||
return (DomInvocationHandler)handler;
|
return (DomInvocationHandler)handler;
|
||||||
}
|
}
|
||||||
return null;
|
else if (handler instanceof DomInvocationHandler.MyInvocationHandler h) {
|
||||||
|
return h.getDomInvocationHandler();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull DomInvocationHandler getNotNullHandler(DomElement proxy) {
|
public static @NotNull DomInvocationHandler getNotNullHandler(DomElement proxy) {
|
||||||
@@ -273,10 +279,6 @@ public final class DomManagerImpl extends DomManager implements Disposable {
|
|||||||
return fileElement;
|
return fileElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<DomFileDescription<?>> getFileDescriptions(String rootTagName) {
|
|
||||||
return myApplicationComponent.getFileDescriptions(rootTagName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Set<DomFileDescription<?>> getAcceptingOtherRootTagNameDescriptions() {
|
public Set<DomFileDescription<?>> getAcceptingOtherRootTagNameDescriptions() {
|
||||||
return myApplicationComponent.getAcceptingOtherRootTagNameDescriptions();
|
return myApplicationComponent.getAcceptingOtherRootTagNameDescriptions();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="module" module-name="intellij.xml.dom.impl" />
|
<orderEntry type="module" module-name="intellij.xml.dom.impl" />
|
||||||
<orderEntry type="library" name="CGLIB" level="project" />
|
|
||||||
<orderEntry type="module" module-name="intellij.xml.impl" />
|
<orderEntry type="module" module-name="intellij.xml.impl" />
|
||||||
<orderEntry type="module" module-name="intellij.java.testFramework" />
|
<orderEntry type="module" module-name="intellij.java.testFramework" />
|
||||||
<orderEntry type="module" module-name="intellij.java.psi.impl" />
|
<orderEntry type="module" module-name="intellij.java.psi.impl" />
|
||||||
<orderEntry type="module" module-name="intellij.java.impl" scope="TEST" />
|
<orderEntry type="module" module-name="intellij.java.impl" scope="TEST" />
|
||||||
<orderEntry type="library" scope="TEST" name="assertJ" level="project" />
|
<orderEntry type="library" scope="TEST" name="assertJ" level="project" />
|
||||||
<orderEntry type="module" module-name="intellij.tools.ide.metrics.benchmark" scope="TEST" />
|
<orderEntry type="module" module-name="intellij.tools.ide.metrics.benchmark" scope="TEST" />
|
||||||
|
<orderEntry type="module" module-name="intellij.libraries.cglib" scope="TEST" />
|
||||||
</component>
|
</component>
|
||||||
<component name="copyright">
|
<component name="copyright">
|
||||||
<Base>
|
<Base>
|
||||||
|
|||||||
Reference in New Issue
Block a user