diff --git a/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaDocumentationProvider.java b/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaDocumentationProvider.java index 562c6499f820..a2c746f8b40a 100644 --- a/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaDocumentationProvider.java +++ b/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaDocumentationProvider.java @@ -31,12 +31,6 @@ public class JsonSchemaDocumentationProvider implements DocumentationProvider { return findSchemaAndGenerateDoc(element, originalElement, true, null); } - @Nullable - @Override - public List getUrlFor(PsiElement element, PsiElement originalElement) { - return null; - } - @Nullable @Override public String generateDoc(PsiElement element, @Nullable PsiElement originalElement) { @@ -213,12 +207,6 @@ public class JsonSchemaDocumentationProvider implements DocumentationProvider { return null; } - @Nullable - @Override - public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { - return null; - } - private static class FakeDocElement extends FakePsiElement { private final PsiElement myContextElement; private final String myAltName; diff --git a/platform/lang-api/src/com/intellij/lang/documentation/DocumentationProvider.java b/platform/lang-api/src/com/intellij/lang/documentation/DocumentationProvider.java index df5c02576a55..4f621089c881 100644 --- a/platform/lang-api/src/com/intellij/lang/documentation/DocumentationProvider.java +++ b/platform/lang-api/src/com/intellij/lang/documentation/DocumentationProvider.java @@ -1,19 +1,4 @@ -/* - * Copyright 2000-2015 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. - */ - +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.lang.documentation; import com.intellij.codeInsight.documentation.DocumentationManagerProtocol; @@ -47,24 +32,29 @@ public interface DocumentationProvider { * a method reference, this will be the method to which the reference is resolved). * @param originalElement the element under the mouse cursor * @return the documentation to show, or null if the provider can't provide any documentation for this element. Documentation can contain - * HTML markup. If HTML special characters need to be shown in popup, they should be properly escaped. + * HTML markup. If HTML special characters need to be shown in popup, they should be properly escaped. */ @Nullable - String getQuickNavigateInfo(PsiElement element, PsiElement originalElement); + default String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) { + return null; + } /** * Returns the list of possible URLs to show as external documentation for the specified element. + * * @param element the element for which the documentation is requested (for example, if the mouse is over * a method reference, this will be the method to which the reference is resolved). * @param originalElement the element under the mouse cursor * @return the list of URLs to open in the browser or to use for showing documentation internally ({@link ExternalDocumentationProvider}). - * If the list contains a single URL, it will be opened. - * If the list contains multiple URLs, the user will be prompted to choose one of them. - * For {@link ExternalDocumentationProvider}, first URL, yielding non-empty result in - * {@link ExternalDocumentationProvider#fetchExternalDocumentation(Project, PsiElement, List)} will be used. + * If the list contains a single URL, it will be opened. + * If the list contains multiple URLs, the user will be prompted to choose one of them. + * For {@link ExternalDocumentationProvider}, first URL, yielding non-empty result in + * {@link ExternalDocumentationProvider#fetchExternalDocumentation(Project, PsiElement, List)} will be used. */ @Nullable - List getUrlFor(PsiElement element, PsiElement originalElement); + default List getUrlFor(PsiElement element, PsiElement originalElement) { + return null; + } /** * Callback for asking the doc provider for the complete documentation. @@ -85,14 +75,18 @@ public interface DocumentationProvider { * @param element the element for which the documentation is requested (for example, if the mouse is over * a method reference, this will be the method to which the reference is resolved). * @param originalElement the element under the mouse cursor - * @return target element's documentation, or {@code null} if provider is unable to generate documentation - * for the given element + * @return target element's documentation, or {@code null} if provider is unable to generate documentation + * for the given element */ @Nullable - String generateDoc(PsiElement element, @Nullable PsiElement originalElement); + default String generateDoc(PsiElement element, @Nullable PsiElement originalElement) { + return null; + } @Nullable - PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element); + default PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element) { + return null; + } /** * Returns the target element for a link in a documentation comment. The link needs to use the @@ -105,5 +99,7 @@ public interface DocumentationProvider { * @see DocumentationManagerUtil#createHyperlink(StringBuilder, String, String, boolean) */ @Nullable - PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context); + default PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { + return null; + } } diff --git a/platform/lang-api/src/com/intellij/lang/documentation/DocumentationProviderEx.java b/platform/lang-api/src/com/intellij/lang/documentation/DocumentationProviderEx.java index 50dd1db2fa5d..99b46f54339e 100644 --- a/platform/lang-api/src/com/intellij/lang/documentation/DocumentationProviderEx.java +++ b/platform/lang-api/src/com/intellij/lang/documentation/DocumentationProviderEx.java @@ -1,59 +1,18 @@ -/* - * Copyright 2000-2012 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. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.lang.documentation; import com.intellij.openapi.editor.Editor; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; -import com.intellij.psi.PsiManager; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.awt.*; -import java.util.List; /** * @author peter */ public class DocumentationProviderEx implements DocumentationProvider { - @Nullable - @Override - public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) { - return null; - } - - @Override - public List getUrlFor(PsiElement element, PsiElement originalElement) { - return null; - } - - @Override - public String generateDoc(PsiElement element, @Nullable PsiElement originalElement) { - return null; - } - - @Override - public PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element) { - return null; - } - - @Override - public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { - return null; - } /** * @param contextElement the leaf PSI element in {@code file} at the editor's caret offset. diff --git a/plugins/ant/src/com/intellij/lang/ant/doc/AntDomDocumentationProvider.java b/plugins/ant/src/com/intellij/lang/ant/doc/AntDomDocumentationProvider.java index f0b0493dc541..8fd57e29c152 100644 --- a/plugins/ant/src/com/intellij/lang/ant/doc/AntDomDocumentationProvider.java +++ b/plugins/ant/src/com/intellij/lang/ant/doc/AntDomDocumentationProvider.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2010 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. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.lang.ant.doc; import com.intellij.lang.ant.AntFilesProvider; @@ -29,7 +15,6 @@ import com.intellij.pom.PomTarget; import com.intellij.pom.PomTargetPsiElement; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; -import com.intellij.psi.PsiManager; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.xml.XmlElement; import com.intellij.psi.xml.XmlTag; @@ -251,14 +236,4 @@ public class AntDomDocumentationProvider implements DocumentationProvider { } return Collections.singletonList(helpFile.getUrl()); } - - @Override - public PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element) { - return null; - } - - @Override - public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { - return null; - } } diff --git a/plugins/gradle/java/src/documentation/GradleDocumentationProvider.java b/plugins/gradle/java/src/documentation/GradleDocumentationProvider.java index 480c1bedfe5a..d841c744f894 100644 --- a/plugins/gradle/java/src/documentation/GradleDocumentationProvider.java +++ b/plugins/gradle/java/src/documentation/GradleDocumentationProvider.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2013 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. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.plugins.gradle.documentation; import com.intellij.codeInsight.javadoc.JavaDocUtil; @@ -34,8 +20,6 @@ import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrCall; import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.literals.GrLiteral; import org.jetbrains.plugins.groovy.lang.psi.impl.synthetic.GrLightVariable; -import java.util.List; - /** * @author Vladislav.Soroka */ @@ -56,12 +40,6 @@ public class GradleDocumentationProvider implements DocumentationProvider { return null; } - @Nullable - @Override - public List getUrlFor(PsiElement element, PsiElement originalElement) { - return null; - } - @Nullable @Override public String generateDoc(PsiElement element, PsiElement originalElement) { diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenModelDocumentationProvider.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenModelDocumentationProvider.java index 33e658cb7c7c..31cef41829c4 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenModelDocumentationProvider.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenModelDocumentationProvider.java @@ -1,24 +1,13 @@ -/* - * 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. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.idea.maven.dom; import com.intellij.lang.documentation.DocumentationProvider; import com.intellij.lang.findUsages.DescriptiveNameUtil; import com.intellij.openapi.util.text.StringUtil; -import com.intellij.psi.*; +import com.intellij.psi.ElementDescriptionLocation; +import com.intellij.psi.ElementDescriptionProvider; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiFile; import com.intellij.psi.impl.FakePsiElement; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.xml.XmlTag; @@ -55,16 +44,6 @@ public class MavenModelDocumentationProvider implements DocumentationProvider, E return getDoc(element, true); } - @Override - public PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element) { - return null; - } - - @Override - public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { - return null; - } - @Nullable private static String getDoc(PsiElement element, boolean html) { return getMavenElementDescription(element, DescKind.TYPE_NAME_VALUE, html); diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenPluginModelDocumentationProvider.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenPluginModelDocumentationProvider.java index 520464cab9c2..f2c59547c9f8 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenPluginModelDocumentationProvider.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenPluginModelDocumentationProvider.java @@ -1,25 +1,8 @@ -/* - * 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. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.idea.maven.dom; import com.intellij.lang.documentation.DocumentationProvider; import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiManager; - -import java.util.List; public class MavenPluginModelDocumentationProvider implements DocumentationProvider { @Override @@ -27,26 +10,11 @@ public class MavenPluginModelDocumentationProvider implements DocumentationProvi return getDocForMavenPluginParameter(element, false); } - @Override - public List getUrlFor(PsiElement element, PsiElement originalElement) { - return null; - } - @Override public String generateDoc(PsiElement element, PsiElement originalElement) { return getDocForMavenPluginParameter(element, true); } - @Override - public PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element) { - return null; - } - - @Override - public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { - return null; - } - private String getDocForMavenPluginParameter(PsiElement element, boolean html) { MavenPluginConfigurationDomExtender.ParameterData p = element.getUserData(MavenPluginConfigurationDomExtender.PLUGIN_PARAMETER_KEY); if (p == null) return null; diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenPomXmlDocumentationProvider.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenPomXmlDocumentationProvider.java index a1e73cc90aee..ef151a2c785e 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenPomXmlDocumentationProvider.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenPomXmlDocumentationProvider.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2012 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. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.idea.maven.dom; import com.intellij.lang.documentation.DocumentationProvider; @@ -80,10 +66,4 @@ public class MavenPomXmlDocumentationProvider implements DocumentationProvider { return myDelegate.getDocumentationElementForLookupItem(psiManager, object, element); } - - @Nullable - @Override - public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { - return null; - } } diff --git a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/impl/XsltDocumentationProvider.java b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/impl/XsltDocumentationProvider.java index 4f60f592f52e..6dd5d17776d6 100644 --- a/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/impl/XsltDocumentationProvider.java +++ b/plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/impl/XsltDocumentationProvider.java @@ -230,12 +230,6 @@ public class XsltDocumentationProvider implements DocumentationProvider { return null; } - @Override - @Nullable - public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) { - return null; - } - static class DocElement extends LightElement implements PsiNamedElement { private final PsiElement myElement; private final String myCategory; diff --git a/plugins/yaml/src/org/jetbrains/yaml/meta/impl/YamlDocumentationProviderBase.java b/plugins/yaml/src/org/jetbrains/yaml/meta/impl/YamlDocumentationProviderBase.java index b5a1c2ce514c..dfa5d5ba3026 100644 --- a/plugins/yaml/src/org/jetbrains/yaml/meta/impl/YamlDocumentationProviderBase.java +++ b/plugins/yaml/src/org/jetbrains/yaml/meta/impl/YamlDocumentationProviderBase.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.yaml.meta.impl; import com.intellij.lang.documentation.AbstractDocumentationProvider; @@ -28,11 +26,6 @@ import java.util.Objects; @ApiStatus.Experimental public abstract class YamlDocumentationProviderBase extends AbstractDocumentationProvider { - @Override - @Nullable - public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) { - return null; - } @Override public String generateDoc(PsiElement element, @Nullable PsiElement originalElement) { diff --git a/plugins/yaml/src/org/jetbrains/yaml/schema/YamlJsonSchemaDocumentationProvider.java b/plugins/yaml/src/org/jetbrains/yaml/schema/YamlJsonSchemaDocumentationProvider.java index a4a7775c0af6..b2a28d3cb5e4 100644 --- a/plugins/yaml/src/org/jetbrains/yaml/schema/YamlJsonSchemaDocumentationProvider.java +++ b/plugins/yaml/src/org/jetbrains/yaml/schema/YamlJsonSchemaDocumentationProvider.java @@ -1,19 +1,16 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.yaml.schema; import com.intellij.lang.documentation.DocumentationProviderEx; import com.intellij.openapi.editor.Editor; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; -import com.intellij.psi.PsiManager; import com.jetbrains.jsonSchema.ide.JsonSchemaService; import com.jetbrains.jsonSchema.impl.JsonSchemaDocumentationProvider; import com.jetbrains.jsonSchema.impl.JsonSchemaObject; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.List; - public class YamlJsonSchemaDocumentationProvider extends DocumentationProviderEx { @Nullable @Override @@ -21,12 +18,6 @@ public class YamlJsonSchemaDocumentationProvider extends DocumentationProviderEx return findSchemaAndGenerateDoc(element, true); } - @Nullable - @Override - public List getUrlFor(PsiElement element, PsiElement originalElement) { - return null; - } - @Nullable @Override public String generateDoc(PsiElement element, @Nullable PsiElement originalElement) { @@ -43,18 +34,6 @@ public class YamlJsonSchemaDocumentationProvider extends DocumentationProviderEx return JsonSchemaDocumentationProvider.generateDoc(element, schemaObject, preferShort, null); } - @Nullable - @Override - public PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element) { - return null; - } - - @Nullable - @Override - public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { - return null; - } - @Nullable @Override public PsiElement getCustomDocumentationElement(@NotNull Editor editor, diff --git a/xml/dom-impl/src/com/intellij/util/xml/DomDocumentationProvider.java b/xml/dom-impl/src/com/intellij/util/xml/DomDocumentationProvider.java index 086141f855b3..9c5be9a5d2c6 100644 --- a/xml/dom-impl/src/com/intellij/util/xml/DomDocumentationProvider.java +++ b/xml/dom-impl/src/com/intellij/util/xml/DomDocumentationProvider.java @@ -1,18 +1,4 @@ -/* - * 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. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.util.xml; import com.intellij.lang.documentation.DocumentationProvider; @@ -20,25 +6,12 @@ import com.intellij.pom.PomTarget; import com.intellij.pom.PomTargetPsiElement; import com.intellij.psi.DelegatePsiTarget; import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiManager; - -import java.util.List; /** * @author Dmitry Avdeev */ public class DomDocumentationProvider implements DocumentationProvider { - @Override - public String getQuickNavigateInfo(final PsiElement element, PsiElement originalElement) { - return null; - } - - @Override - public List getUrlFor(final PsiElement element, final PsiElement originalElement) { - return null; - } - @Override public String generateDoc(PsiElement element, final PsiElement originalElement) { if (element instanceof PomTargetPsiElement) { @@ -58,14 +31,4 @@ public class DomDocumentationProvider implements DocumentationProvider { } return ElementPresentationManager.getDocumentationForElement(domElement); } - - @Override - public PsiElement getDocumentationElementForLookupItem(final PsiManager psiManager, final Object object, final PsiElement element) { - return null; - } - - @Override - public PsiElement getDocumentationElementForLink(final PsiManager psiManager, final String link, final PsiElement context) { - return null; - } } diff --git a/xml/impl/src/com/intellij/xml/util/documentation/XmlDocumentationProvider.java b/xml/impl/src/com/intellij/xml/util/documentation/XmlDocumentationProvider.java index 80566d9ba549..41e588384007 100644 --- a/xml/impl/src/com/intellij/xml/util/documentation/XmlDocumentationProvider.java +++ b/xml/impl/src/com/intellij/xml/util/documentation/XmlDocumentationProvider.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2015 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. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.xml.util.documentation; import com.intellij.lang.Language; @@ -461,11 +447,6 @@ public class XmlDocumentationProvider implements DocumentationProvider { return null; } - @Override - public PsiElement getDocumentationElementForLink(final PsiManager psiManager, String link, PsiElement context) { - return null; - } - private static class MyPsiElementProcessor implements PsiElementProcessor { String result; String version; diff --git a/xml/relaxng/src/org/intellij/plugins/relaxNG/RngDocumentationProvider.java b/xml/relaxng/src/org/intellij/plugins/relaxNG/RngDocumentationProvider.java index 402dcf4c5447..a805286e9be1 100644 --- a/xml/relaxng/src/org/intellij/plugins/relaxNG/RngDocumentationProvider.java +++ b/xml/relaxng/src/org/intellij/plugins/relaxNG/RngDocumentationProvider.java @@ -13,13 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.intellij.plugins.relaxNG; import com.intellij.lang.documentation.DocumentationProvider; import com.intellij.openapi.diagnostic.Logger; import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiManager; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.xml.XmlAttribute; import com.intellij.psi.xml.XmlElement; @@ -37,7 +35,6 @@ import org.jetbrains.annotations.Nullable; import org.kohsuke.rngom.digested.DElementPattern; import java.util.Collection; -import java.util.List; public class RngDocumentationProvider implements DocumentationProvider { private static final Logger LOG = Logger.getInstance(RngDocumentationProvider.class); @@ -130,29 +127,6 @@ public class RngDocumentationProvider implements DocumentationProvider { return null; } - @Override - @Nullable - public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { - return null; - } - - @Override - @Nullable - public PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element) { - return null; - } - - @Override - @Nullable - public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) { - return null; - } - - @Override - public List getUrlFor(PsiElement element, PsiElement originalElement) { - return null; - } - public int hashCode() { return 0; // CompositeDocumentationProvider uses a HashSet that doesn't preserve order. We want to be the first one. } diff --git a/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/RngCompactLanguage.java b/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/RngCompactLanguage.java index aada6617f02e..64998e58ab4d 100644 --- a/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/RngCompactLanguage.java +++ b/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/RngCompactLanguage.java @@ -25,7 +25,10 @@ import com.intellij.lang.refactoring.NamesValidator; import com.intellij.openapi.fileTypes.SingleLazyInstanceSyntaxHighlighterFactory; import com.intellij.openapi.fileTypes.SyntaxHighlighter; import com.intellij.openapi.project.Project; -import com.intellij.psi.*; +import com.intellij.psi.PsiComment; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiFile; +import com.intellij.psi.PsiWhiteSpace; import com.intellij.psi.tree.IElementType; import org.intellij.plugins.relaxNG.compact.psi.RncDefine; import org.intellij.plugins.relaxNG.compact.psi.RncElement; @@ -34,8 +37,6 @@ import org.intellij.plugins.relaxNG.compact.psi.util.RenameUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.List; - public class RngCompactLanguage extends Language { public static final String ID = "RELAX-NG"; @@ -116,16 +117,6 @@ public class RngCompactLanguage extends Language { } public static class MyDocumentationProvider implements DocumentationProvider { - @Override - @Nullable - public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) { - return null; - } - - @Override - public List getUrlFor(PsiElement element, PsiElement originalElement) { - return null; - } @Override @Nullable @@ -151,18 +142,6 @@ public class RngCompactLanguage extends Language { } return null; } - - @Override - @Nullable - public PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element) { - return null; - } - - @Override - @Nullable - public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) { - return null; - } } public static class MySyntaxHighlighterFactory extends SingleLazyInstanceSyntaxHighlighterFactory {