mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notnull
This commit is contained in:
+1
@@ -583,6 +583,7 @@ public class JavaClassReference extends GenericReference implements PsiJavaRefer
|
||||
return myJavaClassReferenceSet;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return myJavaClassReferenceSet.getUnresolvedMessagePattern(myIndex);
|
||||
|
||||
+1
@@ -60,6 +60,7 @@ public class PsiPackageReference extends PsiPolyVariantReferenceBase<PsiElement>
|
||||
return subPackages.toArray();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return JavaErrorMessages.message("cannot.resolve.package");
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.daemon;
|
||||
|
||||
import com.intellij.AbstractBundle;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
/**
|
||||
@@ -31,6 +32,7 @@ public class JavaErrorMessages extends AbstractBundle {
|
||||
super(BUNDLE);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String message(@PropertyKey(resourceBundle = BUNDLE)String key, Object... params) {
|
||||
return INSTANCE.getMessage(key, params);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.intellij.codeInsight.daemon;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Implement this in your {@link com.intellij.psi.PsiReference} to provide custom error message.
|
||||
*/
|
||||
@@ -27,5 +29,6 @@ public interface EmptyResolveMessageProvider {
|
||||
* @return pattern or message
|
||||
* @see XmlHighlightVisitor#getErrorDescription()
|
||||
*/
|
||||
@NotNull
|
||||
String getUnresolvedMessagePattern();
|
||||
}
|
||||
|
||||
@@ -207,6 +207,7 @@ public class PsiDynaReference<T extends PsiElement> extends PsiReferenceBase<T>
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
@SuppressWarnings({"UnresolvedPropertyKey"})
|
||||
public String getUnresolvedMessagePattern() {
|
||||
|
||||
+1
@@ -553,6 +553,7 @@ public class FileReference implements FileReferenceOwner, PsiPolyVariantReferenc
|
||||
return myIndex;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return LangBundle.message("error.cannot.resolve")
|
||||
|
||||
@@ -58,7 +58,8 @@ public abstract class BundleBase {
|
||||
return format(value, params);
|
||||
}
|
||||
|
||||
public static String format(String value, Object... params) {
|
||||
@NotNull
|
||||
public static String format(@NotNull String value, @NotNull Object... params) {
|
||||
if (params.length > 0 && value.indexOf('{') >= 0) {
|
||||
return MessageFormat.format(value, params);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ public class AntDomFileReference extends FileReference implements AntDomReferenc
|
||||
return (AntDomFileReferenceSet)super.getFileReferenceSet();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return AntBundle.message("file.doesnt.exist", getCanonicalRepresentationText());
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.jetbrains.plugins.groovy;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
import java.lang.ref.Reference;
|
||||
@@ -34,6 +35,7 @@ public class GroovyBundle {
|
||||
@NonNls
|
||||
private static final String BUNDLE = "org.jetbrains.plugins.groovy.GroovyBundle";
|
||||
|
||||
@NotNull
|
||||
public static String message(@PropertyKey(resourceBundle = BUNDLE)String key, Object... params) {
|
||||
return CommonBundle.message(getBundle(), key, params);
|
||||
}
|
||||
|
||||
+1
@@ -191,6 +191,7 @@ public abstract class PropertyReferenceBase implements PsiPolyVariantReference,
|
||||
return mySoft;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return PropertiesBundle.message("unresolved.property.key");
|
||||
}
|
||||
|
||||
+1
@@ -134,6 +134,7 @@ public class XsltReferenceContributor {
|
||||
return name.equals(text) || text.endsWith(":" + name);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return "Unknown Type";
|
||||
|
||||
+1
@@ -187,6 +187,7 @@ class ModeReference extends SimpleAttributeReference implements PsiPolyVariantRe
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
final QName qName = myImplicitModeElement.getQName();
|
||||
if (qName != null && qName != QNameUtil.UNRESOLVED) {
|
||||
|
||||
+1
@@ -70,6 +70,7 @@ public class PrefixReference extends SimpleAttributeReference implements EmptyRe
|
||||
return XsltNamespaceContext.resolvePrefix(getCanonicalText(), myAttribute);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return "Undeclared namespace prefix ''{0}''";
|
||||
}
|
||||
|
||||
+1
@@ -86,6 +86,7 @@ class TemplateReference extends AttributeReference implements EmptyResolveMessag
|
||||
QuickFixAction.registerQuickFixAction(highlightInfo, new CreateTemplateFix(myAttribute.getParent(), myName));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return "Cannot resolve template ''{0}''";
|
||||
}
|
||||
|
||||
@@ -142,6 +142,7 @@ public class GenericDomValueReference<T> extends PsiReferenceBase<XmlElement> im
|
||||
return StringUtil.notNullize(getStringValue());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
final ConvertContext context = getConvertContext();
|
||||
return getConverter().getErrorMessage(getStringValue(), context);
|
||||
|
||||
@@ -251,6 +251,7 @@ public abstract class DelimitedListConverter<T> extends ResolvingConverter<List<
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return getUnresolvedMessage(getValue());
|
||||
}
|
||||
|
||||
@@ -148,6 +148,7 @@ public abstract class QuotedValueConverter<T> extends ResolvingConverter<T> impl
|
||||
return getReferenceVariants(myContext, myGenericDomValue, getRangeInElement());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return myBadQuotation? DomBundle.message("message.invalid.value.quotation") : getUnresolvedMessage(getValue());
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.daemon;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
import java.lang.ref.Reference;
|
||||
@@ -34,6 +35,7 @@ public class XmlErrorMessages {
|
||||
private XmlErrorMessages() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String message(@PropertyKey(resourceBundle = BUNDLE)String key, Object... params) {
|
||||
return CommonBundle.message(getBundle(), key, params);
|
||||
}
|
||||
|
||||
+1
@@ -65,6 +65,7 @@ public class XmlEncodingReference implements PsiReference, EmptyResolveMessagePr
|
||||
//return myValue.getManager().findClass(fqn, GlobalSearchScope.allScope(myValue.getProject()));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
//noinspection UnresolvedPropertyKey
|
||||
return XmlErrorMessages.message("unknown.encoding.0");
|
||||
|
||||
+2
@@ -138,6 +138,7 @@ public class DtdReferencesProvider extends PsiReferenceProvider {
|
||||
};
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return XmlBundle.message("xml.dtd.unresolved.element.reference", getCanonicalText());
|
||||
}
|
||||
@@ -259,6 +260,7 @@ public class DtdReferencesProvider extends PsiReferenceProvider {
|
||||
};
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return XmlBundle.message("xml.dtd.unresolved.entity.reference", getCanonicalText());
|
||||
}
|
||||
|
||||
+1
@@ -124,6 +124,7 @@ public class SchemaReferencesProvider extends PsiReferenceProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return message;
|
||||
}
|
||||
|
||||
+1
@@ -225,6 +225,7 @@ public class URLReference implements PsiReference, QuickFixProvider, EmptyResolv
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return XmlErrorMessages.message(myIncorrectResourceMapped ? "registered.resource.is.not.recognized":"uri.is.not.registered");
|
||||
}
|
||||
|
||||
@@ -215,6 +215,7 @@ public class AnchorReference implements PsiReference, EmptyResolveMessageProvide
|
||||
return mySoft;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
final XmlFile xmlFile = getFile();
|
||||
return xmlFile == null ?
|
||||
|
||||
@@ -147,6 +147,7 @@ class PatternReference extends PsiReferenceBase.Poly<RncRef> implements Function
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return "Unresolved pattern reference ''{0}''";
|
||||
}
|
||||
|
||||
@@ -135,6 +135,7 @@ public class RncNameImpl extends RncElementImpl implements RncName, PsiReference
|
||||
return "xsd".equals(prefix) || "xml".equals(prefix);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return "Unresolved namespace prefix ''{0}''";
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ public class PrefixReferenceProvider extends PsiReferenceProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return "Undefined namespace prefix ''{0}''";
|
||||
}
|
||||
|
||||
@@ -153,6 +153,7 @@ public class DefinitionReference extends PsiReferenceBase.Poly<XmlAttributeValue
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getUnresolvedMessagePattern() {
|
||||
return "Unresolved pattern reference ''{0}''";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user