File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/com/magento/idea/magento2plugin Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -105,12 +105,19 @@ public XmlCompletionContributor() {
105105
106106 // <source_model>php class completion</source_model> in system.xml files.
107107 extend (CompletionType .BASIC , psiElement (XmlTokenType .XML_DATA_CHARACTERS )
108- .inside (XmlPatterns .xmlTag ().withName (ModuleSystemXml .SOURCE_MODEL_ELEMENT_NAME )
108+ .inside (XmlPatterns .xmlTag ().withName (ModuleSystemXml .XML_TAG_SOURCE_MODEL )
109109 .withParent (XmlPatterns .xmlTag ().withName (ModuleSystemXml .FIELD_ELEMENT_NAME ))
110110 ).inFile (xmlFile ().withName (string ().endsWith (ModuleSystemXml .FILE_NAME ))),
111111 new PhpClassCompletionProvider ()
112112 );
113113
114+ // <frontend_model>completion</frontend_model>
115+ extend (CompletionType .BASIC ,
116+ psiElement (XmlTokenType .XML_DATA_CHARACTERS )
117+ .inside (XmlPatterns .xmlTag ().withName (ModuleSystemXml .XML_TAG_FRONTEND_MODEL )),
118+ new PhpClassCompletionProvider ()
119+ );
120+
114121 // <parameter source_model="completion">...</parameter> in widget.xml files.
115122 extend (CompletionType .BASIC , psiElement (XmlTokenType .XML_ATTRIBUTE_VALUE_TOKEN )
116123 .inside (XmlPatterns .xmlAttribute ().withName (ModuleWidgetXml .ATTRIBUTE_SOURCE_MODEL_NAME )
Original file line number Diff line number Diff line change 77public class ModuleSystemXml {
88 public static final String FILE_NAME = "system.xml" ;
99 public static final String FIELD_ELEMENT_NAME = "field" ;
10- public static final String SOURCE_MODEL_ELEMENT_NAME = "source_model" ;
10+ public static final String XML_TAG_SOURCE_MODEL = "source_model" ;
11+ public static final String XML_TAG_FRONTEND_MODEL = "frontend_model" ;
1112}
You can’t perform that action at this time.
0 commit comments