File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
src/com/magento/idea/magento2plugin Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,19 @@ public XmlCompletionContributor() {
118
118
new PhpClassCompletionProvider ()
119
119
);
120
120
121
+ // <backend_model>completion</backend_model>
122
+ extend (CompletionType .BASIC ,
123
+ psiElement (XmlTokenType .XML_DATA_CHARACTERS )
124
+ .inside (XmlPatterns .xmlTag ().withName (ModuleSystemXml .XML_TAG_BACKEND_MODEL )),
125
+ new PhpClassCompletionProvider ()
126
+ );
127
+
128
+ // <randomTag backend_model="completion">
129
+ extend (CompletionType .BASIC , psiElement (XmlTokenType .XML_ATTRIBUTE_VALUE_TOKEN )
130
+ .inside (XmlPatterns .xmlAttribute ().withName (ModuleConfigXml .XML_ATTRIBUTE_BACKEND_MODEL )),
131
+ new PhpClassCompletionProvider ()
132
+ );
133
+
121
134
// <parameter source_model="completion">...</parameter> in widget.xml files.
122
135
extend (CompletionType .BASIC , psiElement (XmlTokenType .XML_ATTRIBUTE_VALUE_TOKEN )
123
136
.inside (XmlPatterns .xmlAttribute ().withName (ModuleWidgetXml .ATTRIBUTE_SOURCE_MODEL_NAME )
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright © Magento, Inc. All rights reserved.
3
+ * See COPYING.txt for license details.
4
+ */
5
+ package com .magento .idea .magento2plugin .magento .files ;
6
+
7
+ public class ModuleConfigXml {
8
+ public static final String XML_ATTRIBUTE_BACKEND_MODEL = "backend_model" ;
9
+ }
Original file line number Diff line number Diff line change @@ -9,4 +9,5 @@ public class ModuleSystemXml {
9
9
public static final String FIELD_ELEMENT_NAME = "field" ;
10
10
public static final String XML_TAG_SOURCE_MODEL = "source_model" ;
11
11
public static final String XML_TAG_FRONTEND_MODEL = "frontend_model" ;
12
+ public static final String XML_TAG_BACKEND_MODEL = "backend_model" ;
12
13
}
You can’t perform that action at this time.
0 commit comments