Skip to content
Snippets Groups Projects
Commit 6330a625 authored by Johannes Mey's avatar Johannes Mey
Browse files

fix some wrong inspection messages

parent 34499bb9
No related branches found
No related tags found
1 merge request!14fix some wrong inspection messages
Pipeline #14148 passed
......@@ -24,6 +24,7 @@
### Fixed
- A bug for type name refactoring in grammar files which prevented the actual definition from being renamed.
- Wrong inspection messages related to names in wrappers of injected java code ("x", "m", "X").
## [0.2.0]
......
......@@ -26,9 +26,9 @@ public class JavaLanguageInjector implements LanguageInjector {
if (host.isValidHost()) {
// TODO more injections
if (host instanceof JastAddAspectBlock) {
injectionPlacesRegistrar.addPlace(JavaLanguage.INSTANCE, new TextRange(1, host.getTextLength() - 1), "class X { public void m() {", "}}");
injectionPlacesRegistrar.addPlace(JavaLanguage.INSTANCE, new TextRange(1, host.getTextLength() - 1), "class Unused$ClassName { public void unused$MethodName() {", "}}");
} else if (host instanceof JastAddAspectExpression) {
injectionPlacesRegistrar.addPlace(JavaLanguage.INSTANCE, new TextRange(0, host.getTextLength()), "class X { public void m() {Object x = ", ";}}");
injectionPlacesRegistrar.addPlace(JavaLanguage.INSTANCE, new TextRange(0, host.getTextLength()), "class Unused$ClassName { public void unused$MethodName() {Object unused$VariableName = ", ";}}");
} else if (host instanceof JastAddAspectAspectClassDeclaration) {
injectionPlacesRegistrar.addPlace(JavaLanguage.INSTANCE, new TextRange(0, host.getTextLength()), "", "");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment