File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
src/com/magento/idea/magento2plugin/completion Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ protected void addCompletions(
40
40
if (position == null || !Settings .isEnabled (position .getProject ())) {
41
41
return ;
42
42
}
43
- final String prefix = result .getPrefixMatcher ().getPrefix ().trim ();
44
-
45
43
final XmlTag startingTag = PsiTreeUtil .getParentOfType (
46
44
position ,
47
45
XmlTag .class
@@ -59,6 +57,7 @@ protected void addCompletions(
59
57
if (currentPath == null ) {
60
58
return ;
61
59
}
60
+ final String prefix = result .getPrefixMatcher ().getPrefix ().trim ();
62
61
final String capture = currentPath + "." + prefix ;
63
62
64
63
for (final LookupElement element : makeCompletion (capture , position .getProject ())) {
@@ -97,7 +96,7 @@ public static List<LookupElement> makeCompletion(
97
96
}
98
97
final String [] pathParts = input .split ("\\ ." );
99
98
100
- if (pathParts .length != 3 ) {
99
+ if (pathParts .length != 3 ) { //NOPMD
101
100
return ;
102
101
}
103
102
final String fieldId = pathParts [2 ];
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ protected void addCompletions(
40
40
if (position == null || !Settings .isEnabled (position .getProject ())) {
41
41
return ;
42
42
}
43
- final String prefix = result .getPrefixMatcher ().getPrefix ().trim ();
44
43
final XmlTag startingTag = PsiTreeUtil .getParentOfType (
45
44
position ,
46
45
XmlTag .class
@@ -57,6 +56,7 @@ protected void addCompletions(
57
56
if (currentPath == null ) {
58
57
return ;
59
58
}
59
+ final String prefix = result .getPrefixMatcher ().getPrefix ().trim ();
60
60
final String capture = currentPath + "." + prefix ;
61
61
62
62
for (final LookupElement element : makeCompletion (capture , position .getProject ())) {
@@ -97,7 +97,7 @@ public static List<LookupElement> makeCompletion(
97
97
}
98
98
final String [] groupNameParts = input .split ("\\ ." );
99
99
100
- if (groupNameParts .length != 2 ) {
100
+ if (groupNameParts .length != 2 ) { //NOPMD
101
101
return ;
102
102
}
103
103
final String groupId = groupNameParts [1 ];
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ public class SystemConfigurationContributor extends CompletionContributor {
27
27
/**
28
28
* Contributes completions to the system.xml and config.xml files.
29
29
*/
30
+ @ SuppressWarnings ("PMD.ExcessiveMethodLength" )
30
31
public SystemConfigurationContributor () {
32
+ super ();
31
33
final XmlFilePattern .Capture systemXmlFileCapture = XmlPatterns
32
34
.xmlFile ()
33
35
.withName (StandardPatterns .string ().endsWith (ModuleSystemXmlFile .FILE_NAME ));
You can’t perform that action at this time.
0 commit comments