mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 06:39:38 +07:00
[xml] API cleanup: remove unused API which was deprecated for a long time (IDEA-259329)
GitOrigin-RevId: 99dd9576adf442c5f7a9f14e2eebe56c08878f98
This commit is contained in:
committed by
intellij-monorepo-bot
parent
627a5e67df
commit
f52be91e8e
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.util.xml;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
* @deprecated use {@link DomEventListener} directly
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class DomEventAdapter implements DomEventListener {
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2014 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.util.xml;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.psi.search.DelegatingGlobalSearchScope;
|
||||
|
||||
/**
|
||||
* @deprecated use {@link Module#getModuleContentScope()}
|
||||
*/
|
||||
@Deprecated
|
||||
public class ModuleContentRootSearchScope extends DelegatingGlobalSearchScope {
|
||||
|
||||
public ModuleContentRootSearchScope(final Module module) {
|
||||
super(module.getModuleContentScope());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,24 +51,13 @@ public abstract class ResolvingConverter<T> extends Converter<T> implements Reso
|
||||
@NotNull
|
||||
public abstract Collection<? extends T> getVariants(final ConvertContext context);
|
||||
|
||||
/**
|
||||
* @return additional reference variants. They won't resolve to anywhere, but won't be highlighted as errors.
|
||||
* They will also appear in the completion dropdown.
|
||||
*
|
||||
* @deprecated implement {@link #getAdditionalVariants(ConvertContext)}
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
public Set<String> getAdditionalVariants() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
/**
|
||||
* @return additional reference variants. They won't resolve to anywhere, but won't be highlighted as errors.
|
||||
* They will also appear in the completion dropdown.
|
||||
*/
|
||||
@NotNull
|
||||
public Set<String> getAdditionalVariants(@NotNull final ConvertContext context) {
|
||||
return getAdditionalVariants();
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.psi.TokenType;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.util.text.CharArrayCharSequence;
|
||||
import com.intellij.util.text.CharArrayUtil;
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
|
||||
import org.intellij.plugins.relaxNG.compact.RncTokenTypes;
|
||||
@@ -30,7 +29,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.kohsuke.rngom.parse.compact.*;
|
||||
|
||||
import java.io.CharArrayReader;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
@@ -128,11 +126,6 @@ public final class CompactSyntaxLexerAdapter extends LexerBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public char[] getBuffer() {
|
||||
return CharArrayUtil.fromSequence(myBuffer);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public CharSequence getBufferSequence() {
|
||||
@@ -173,14 +166,6 @@ public final class CompactSyntaxLexerAdapter extends LexerBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void start(char[] buffer, int startOffset, int endOffset, int initialState) {
|
||||
myBuffer = new CharArrayCharSequence(buffer, startOffset, endOffset);
|
||||
|
||||
final CharArrayReader reader = new CharArrayReader(buffer, startOffset, endOffset - startOffset);
|
||||
init(startOffset, endOffset, reader, initialState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) {
|
||||
myBuffer = buffer;
|
||||
|
||||
@@ -13,14 +13,6 @@ public class XMLLanguage extends CompositeLanguage {
|
||||
super("XML", "application/xml", "text/xml");
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #XMLLanguage(Language, String, String...)}
|
||||
*/
|
||||
@Deprecated
|
||||
protected XMLLanguage(@NonNls String name, @NonNls String... mime) {
|
||||
super(name, mime);
|
||||
}
|
||||
|
||||
protected XMLLanguage(Language baseLanguage, @NonNls String name, @NonNls String... mime) {
|
||||
super(baseLanguage, name, mime);
|
||||
}
|
||||
|
||||
@@ -28,9 +28,6 @@ import com.intellij.util.containers.MultiMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.intellij.ide.highlighter.XmlFileHighlighter.EMBEDDED_HIGHLIGHTERS;
|
||||
import static com.intellij.ide.highlighter.XmlFileHighlighter.registerAdditionalHighlighters;
|
||||
@@ -87,15 +84,4 @@ public class HtmlFileHighlighter extends SyntaxHighlighterBase {
|
||||
return SyntaxHighlighterBase.pack(XmlHighlighterColors.HTML_CODE, ourMap.get(tokenType).toArray(TextAttributesKey.EMPTY_ARRAY));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link EmbeddedTokenHighlighter} extension
|
||||
*/
|
||||
@Deprecated
|
||||
public static synchronized void registerEmbeddedTokenAttributes(Map<IElementType, TextAttributesKey> _keys1,
|
||||
Map<IElementType, TextAttributesKey> _keys2) {
|
||||
HashSet<IElementType> existingKeys = new HashSet<>(ourMap.keySet());
|
||||
XmlFileHighlighter.addMissing(_keys1, existingKeys, ourMap);
|
||||
XmlFileHighlighter.addMissing(_keys2, existingKeys, ourMap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,25 +158,4 @@ public class XmlFileHighlighter extends SyntaxHighlighterBase {
|
||||
return Holder.ourMap.get(tokenType).toArray(TextAttributesKey.EMPTY_ARRAY);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link EmbeddedTokenHighlighter} extension
|
||||
*/
|
||||
@Deprecated
|
||||
public static synchronized void registerEmbeddedTokenAttributes(Map<IElementType, TextAttributesKey> _keys1,
|
||||
Map<IElementType, TextAttributesKey> _keys2) {
|
||||
HashSet<IElementType> existingKeys = new HashSet<>(Holder.ourMap.keySet());
|
||||
addMissing(_keys1, existingKeys, Holder.ourMap);
|
||||
addMissing(_keys2, existingKeys, Holder.ourMap);
|
||||
}
|
||||
|
||||
static void addMissing(Map<IElementType, TextAttributesKey> from, Set<IElementType> existingKeys, MultiMap<IElementType, TextAttributesKey> to) {
|
||||
if (from != null) {
|
||||
for (Map.Entry<IElementType, TextAttributesKey> entry : from.entrySet()) {
|
||||
if (!existingKeys.contains(entry.getKey())) {
|
||||
to.putValue(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,15 +250,6 @@ public class ExternalResourceManagerExImpl extends ExternalResourceManagerEx imp
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #registerResourceTemporarily(String, String, Disposable)}
|
||||
*/
|
||||
@Deprecated
|
||||
@TestOnly
|
||||
public static void addTestResource(final String url, final String location, Disposable parentDisposable) {
|
||||
registerResourceTemporarily(url, location, parentDisposable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addResource(@NotNull String url, String location) {
|
||||
addResource(url, DEFAULT_VERSION, location);
|
||||
|
||||
Reference in New Issue
Block a user