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() {
105
105
106
106
// <source_model>php class completion</source_model> in system.xml files.
107
107
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 )
109
109
.withParent (XmlPatterns .xmlTag ().withName (ModuleSystemXml .FIELD_ELEMENT_NAME ))
110
110
).inFile (xmlFile ().withName (string ().endsWith (ModuleSystemXml .FILE_NAME ))),
111
111
new PhpClassCompletionProvider ()
112
112
);
113
113
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
+
114
121
// <parameter source_model="completion">...</parameter> in widget.xml files.
115
122
extend (CompletionType .BASIC , psiElement (XmlTokenType .XML_ATTRIBUTE_VALUE_TOKEN )
116
123
.inside (XmlPatterns .xmlAttribute ().withName (ModuleWidgetXml .ATTRIBUTE_SOURCE_MODEL_NAME )
Original file line number Diff line number Diff line change 7
7
public class ModuleSystemXml {
8
8
public static final String FILE_NAME = "system.xml" ;
9
9
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" ;
11
12
}
You can’t perform that action at this time.
0 commit comments