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(
4040 if (position == null || !Settings .isEnabled (position .getProject ())) {
4141 return ;
4242 }
43- final String prefix = result .getPrefixMatcher ().getPrefix ().trim ();
44-
4543 final XmlTag startingTag = PsiTreeUtil .getParentOfType (
4644 position ,
4745 XmlTag .class
@@ -59,6 +57,7 @@ protected void addCompletions(
5957 if (currentPath == null ) {
6058 return ;
6159 }
60+ final String prefix = result .getPrefixMatcher ().getPrefix ().trim ();
6261 final String capture = currentPath + "." + prefix ;
6362
6463 for (final LookupElement element : makeCompletion (capture , position .getProject ())) {
@@ -97,7 +96,7 @@ public static List<LookupElement> makeCompletion(
9796 }
9897 final String [] pathParts = input .split ("\\ ." );
9998
100- if (pathParts .length != 3 ) {
99+ if (pathParts .length != 3 ) { //NOPMD
101100 return ;
102101 }
103102 final String fieldId = pathParts [2 ];
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ protected void addCompletions(
4040 if (position == null || !Settings .isEnabled (position .getProject ())) {
4141 return ;
4242 }
43- final String prefix = result .getPrefixMatcher ().getPrefix ().trim ();
4443 final XmlTag startingTag = PsiTreeUtil .getParentOfType (
4544 position ,
4645 XmlTag .class
@@ -57,6 +56,7 @@ protected void addCompletions(
5756 if (currentPath == null ) {
5857 return ;
5958 }
59+ final String prefix = result .getPrefixMatcher ().getPrefix ().trim ();
6060 final String capture = currentPath + "." + prefix ;
6161
6262 for (final LookupElement element : makeCompletion (capture , position .getProject ())) {
@@ -97,7 +97,7 @@ public static List<LookupElement> makeCompletion(
9797 }
9898 final String [] groupNameParts = input .split ("\\ ." );
9999
100- if (groupNameParts .length != 2 ) {
100+ if (groupNameParts .length != 2 ) { //NOPMD
101101 return ;
102102 }
103103 final String groupId = groupNameParts [1 ];
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ public class SystemConfigurationContributor extends CompletionContributor {
2727 /**
2828 * Contributes completions to the system.xml and config.xml files.
2929 */
30+ @ SuppressWarnings ("PMD.ExcessiveMethodLength" )
3031 public SystemConfigurationContributor () {
32+ super ();
3133 final XmlFilePattern .Capture systemXmlFileCapture = XmlPatterns
3234 .xmlFile ()
3335 .withName (StandardPatterns .string ().endsWith (ModuleSystemXmlFile .FILE_NAME ));
You can’t perform that action at this time.
0 commit comments