mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
i18n: extract SSR related strings to SSRBundle
GitOrigin-RevId: f8a3ba74b3667390365c16bf50a67b15f3962a0c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4f88934707
commit
26a0af9d47
+2
-2
@@ -52,7 +52,7 @@ final class JavaPredefinedConfigurations {
|
||||
getOperatorType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.logging.without.if"), "[!within( statement in if )]LOG.debug('_Argument*);",
|
||||
getOperatorType()),
|
||||
createSearchTemplateInfo("statement in if", "if('_condition) { 'statement*; }", getOperatorType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.statement.in.if"), "if('_condition) { 'statement*; }", getOperatorType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.assert.without.description"), "assert '_condition : '_description{0};",
|
||||
getOperatorType()),
|
||||
|
||||
@@ -374,7 +374,7 @@ final class JavaPredefinedConfigurations {
|
||||
//createSearchTemplateInfo("symbols used","'_:[ref('Symbol)] ", INTERESTING_TYPE),
|
||||
//createSearchTemplateInfo("types used","'_:[ref('Type)] '_;", INTERESTING_TYPE),
|
||||
|
||||
createSearchTemplateInfo("xml attribute references java class", "<'_tag 'attribute=\"'_value:[ref( classes, interfaces & enums )]\"/>", SSRBundle.message("xml_html.category"), StdFileTypes.XML),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.xml.attribute.referencing.java.class"), "<'_tag 'attribute=\"'_value:[ref( classes, interfaces & enums )]\"/>", SSRBundle.message("xml_html.category"), StdFileTypes.XML),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -14,6 +14,7 @@ import com.intellij.psi.search.searches.ClassInheritorsSearch;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.util.PsiUtil;
|
||||
import com.intellij.structuralsearch.MalformedPatternException;
|
||||
import com.intellij.structuralsearch.SSRBundle;
|
||||
import com.intellij.structuralsearch.StructuralSearchUtil;
|
||||
import com.intellij.structuralsearch.impl.matcher.CompiledPattern;
|
||||
import com.intellij.structuralsearch.impl.matcher.JavaCompiledPattern;
|
||||
@@ -237,7 +238,7 @@ public class JavaCompilingVisitor extends JavaRecursiveElementWalkingVisitor {
|
||||
|
||||
if (PsiType.CHAR.equals(expression.getType()) &&
|
||||
(handler instanceof LiteralWithSubstitutionHandler || handler == null && expression.getValue() == null)) {
|
||||
throw new MalformedPatternException("Bad character literal");
|
||||
throw new MalformedPatternException(SSRBundle.message("error.bad.character.literal"));
|
||||
}
|
||||
if (handler != null) {
|
||||
expression.putUserData(CompiledPattern.HANDLER_KEY, handler);
|
||||
@@ -245,7 +246,7 @@ public class JavaCompilingVisitor extends JavaRecursiveElementWalkingVisitor {
|
||||
}
|
||||
else {
|
||||
if (!PsiType.NULL.equals(expression.getType()) && expression.getValue() == null) {
|
||||
throw new MalformedPatternException("Bad literal");
|
||||
throw new MalformedPatternException(SSRBundle.message("error.bad.literal"));
|
||||
}
|
||||
}
|
||||
super.visitLiteralExpression(expression);
|
||||
|
||||
@@ -88,12 +88,12 @@ public class Matcher {
|
||||
else {
|
||||
final Set<String> set = ourRecursionGuard.get();
|
||||
if (!set.add(constraint)) {
|
||||
throw new MalformedPatternException("Pattern recursively references itself");
|
||||
throw new MalformedPatternException(SSRBundle.message("error.pattern.recursively.references.itself"));
|
||||
}
|
||||
try {
|
||||
final Configuration configuration = ConfigurationManager.getInstance(project).findConfigurationByName(constraint);
|
||||
if (configuration == null) {
|
||||
throw new MalformedPatternException("Configuration '" + constraint + "' not found");
|
||||
throw new MalformedPatternException(SSRBundle.message("error.configuration.0.not.found", constraint));
|
||||
}
|
||||
return new Matcher(project, configuration.getMatchOptions());
|
||||
} finally {
|
||||
|
||||
+1
-1
@@ -588,7 +588,7 @@ public final class PatternCompiler {
|
||||
final String problem = ScriptSupport.checkValidScript(script, matchOptions);
|
||||
if (problem != null) {
|
||||
if (checkForErrors) {
|
||||
throw new MalformedPatternException("Script constraint for " + constraint.getName() + " has problem " + problem);
|
||||
throw new MalformedPatternException(SSRBundle.message("error.script.constraint.for.0.has.problem.1", constraint.getName(), problem));
|
||||
}
|
||||
else {
|
||||
return;
|
||||
|
||||
@@ -230,6 +230,8 @@ predefined.configuration.sample.method.invokation.with.constant.argument=sample
|
||||
predefined.configuration.interfaces.having.no.descendants=interface that is not implemented or extended
|
||||
predefined.configuration.enums=enums
|
||||
predefined.configuration.comments.containing.word=comments containing a given word
|
||||
predefined.configuration.xml.attribute.referencing.java.class=xml attribute referencing java class
|
||||
predefined.configuration.statement.in.if=statement in if
|
||||
|
||||
# edit variable constraint dialog options
|
||||
invalid.regular.expression=Invalid regular expression\: {0}
|
||||
@@ -276,6 +278,11 @@ invalid.modifier.type=Invalid modifier type {0}
|
||||
error.argument.expected=Argument expected on ''{0}'' constraint
|
||||
error.cannot.invert=Cannot invert ''{0}'' constraint
|
||||
error.only.applicable.to.complete.match=Constraint ''{0}'' is only applicable to Complete Match
|
||||
error.bad.character.literal=Bad character literal
|
||||
error.bad.literal=Bad literal
|
||||
error.pattern.recursively.references.itself=Pattern recursively references itself
|
||||
error.configuration.0.not.found=Configuration ''{0}'' not found
|
||||
error.script.constraint.for.0.has.problem.1=Script constraint for {0} has problem {1}
|
||||
|
||||
SSRInspection.replace.with=Replace with ''{0}''
|
||||
SSRInspection.family.name=Replace Structurally
|
||||
|
||||
Reference in New Issue
Block a user