mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
introducing AbstractDocumentationProvider
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
package org.intellij.lang.regexp;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.lang.documentation.QuickDocumentationProvider;
|
||||
import com.intellij.lang.documentation.AbstractDocumentationProvider;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import org.intellij.lang.regexp.psi.RegExpElement;
|
||||
@@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* @author vnikolaenko
|
||||
*/
|
||||
public class RegExpDocumentationProvider extends QuickDocumentationProvider {
|
||||
public class RegExpDocumentationProvider extends AbstractDocumentationProvider {
|
||||
@Override
|
||||
@Nullable
|
||||
public String generateDoc(PsiElement element, PsiElement originalElement) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.intellij.images.fileTypes;
|
||||
|
||||
import com.intellij.lang.documentation.QuickDocumentationProvider;
|
||||
import com.intellij.lang.documentation.AbstractDocumentationProvider;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileWithId;
|
||||
@@ -30,13 +30,9 @@ import java.net.URISyntaxException;
|
||||
/**
|
||||
* @author spleaner
|
||||
*/
|
||||
public class ImageDocumentationProvider extends QuickDocumentationProvider {
|
||||
public class ImageDocumentationProvider extends AbstractDocumentationProvider {
|
||||
private static final int MAX_IMAGE_SIZE = 300;
|
||||
|
||||
public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateDoc(PsiElement element, PsiElement originalElement) {
|
||||
final String[] result = new String[] {null};
|
||||
|
||||
@@ -17,17 +17,13 @@ package com.intellij.lang.java;
|
||||
|
||||
import com.intellij.codeInsight.javadoc.JavaDocExternalFilter;
|
||||
import com.intellij.codeInsight.javadoc.JavaDocInfoGenerator;
|
||||
import com.intellij.lang.documentation.QuickDocumentationProvider;
|
||||
import com.intellij.lang.documentation.AbstractDocumentationProvider;
|
||||
import com.intellij.psi.PsiElement;
|
||||
|
||||
/**
|
||||
* @author spleaner
|
||||
*/
|
||||
public class FileDocumentationProvider extends QuickDocumentationProvider {
|
||||
|
||||
public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) {
|
||||
return null;
|
||||
}
|
||||
public class FileDocumentationProvider extends AbstractDocumentationProvider {
|
||||
|
||||
@Override
|
||||
public String generateDoc(PsiElement element, PsiElement originalElement) {
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2000-2011 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.lang.documentation;
|
||||
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public abstract class AbstractDocumentationProvider implements DocumentationProvider {
|
||||
|
||||
@Override
|
||||
public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getUrlFor(PsiElement element, PsiElement originalElement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateDoc(PsiElement element, 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;
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* @see com.intellij.lang.LanguageDocumentation
|
||||
* @see AbstractDocumentationProvider
|
||||
*/
|
||||
public interface DocumentationProvider {
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @see AbstractDocumentationProvider
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class QuickDocumentationProvider implements DocumentationProvider {
|
||||
@Nullable
|
||||
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
package com.intellij.lang.properties;
|
||||
|
||||
import com.intellij.lang.documentation.QuickDocumentationProvider;
|
||||
import com.intellij.lang.documentation.AbstractDocumentationProvider;
|
||||
import com.intellij.lang.properties.psi.Property;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class PropertiesDocumentationProvider extends QuickDocumentationProvider {
|
||||
public class PropertiesDocumentationProvider extends AbstractDocumentationProvider {
|
||||
@Nullable
|
||||
public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) {
|
||||
if (element instanceof Property) {
|
||||
|
||||
Reference in New Issue
Block a user