Search in sources :

Example 6 with StringInterner

use of com.intellij.util.containers.StringInterner in project intellij-community by JetBrains.

the class GeneratedStructureModel method getInterner.

// we keep a shared string interner across all currently running xslt debugger instances. it should go away once
// all instances (and their toolwindow contents) are gone. This should minimize the memory usage of the generated
// structure tree.
private static StringInterner getInterner() {
    StringInterner interner = SoftReference.dereference(ourSharedInterner);
    if (interner == null) {
        interner = new StringInterner();
        ourSharedInterner = new WeakReference<>(interner);
    }
    return interner;
}
Also used : StringInterner(com.intellij.util.containers.StringInterner)

Aggregations

StringInterner (com.intellij.util.containers.StringInterner)6 Element (org.jdom.Element)4 TrackingPathMacroSubstitutor (com.intellij.openapi.components.TrackingPathMacroSubstitutor)2 NotNull (org.jetbrains.annotations.NotNull)2 PluginException (com.intellij.diagnostic.PluginException)1 CompositePathMacroFilter (com.intellij.openapi.components.CompositePathMacroFilter)1 PluginId (com.intellij.openapi.extensions.PluginId)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 XmlBuilder (com.intellij.psi.impl.source.parsing.xml.XmlBuilder)1 XmlBuilderDriver (com.intellij.psi.impl.source.parsing.xml.XmlBuilderDriver)1 THashMap (gnu.trove.THashMap)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 TreeMap (java.util.TreeMap)1