2
2
* Copyright © Magento, Inc. All rights reserved.
3
3
* See COPYING.txt for license details.
4
4
*/
5
+
5
6
package com .magento .idea .magento2plugin .completion .provider ;
6
7
7
8
import com .intellij .codeInsight .completion .CompletionParameters ;
8
9
import com .intellij .codeInsight .completion .CompletionProvider ;
9
10
import com .intellij .codeInsight .completion .CompletionResultSet ;
10
11
import com .intellij .codeInsight .completion .PlainPrefixMatcher ;
11
12
import com .intellij .codeInsight .lookup .LookupElementBuilder ;
13
+ import com .intellij .icons .AllIcons ;
12
14
import com .intellij .psi .PsiElement ;
13
15
import com .intellij .util .ProcessingContext ;
14
- import com .jetbrains .php .PhpIcons ;
15
16
import com .magento .idea .magento2plugin .indexes .DiIndex ;
17
+ import java .util .Collection ;
16
18
import org .jetbrains .annotations .NotNull ;
17
19
18
- import java .util .Collection ;
19
20
20
21
public class VirtualTypeCompletionProvider extends CompletionProvider <CompletionParameters > {
21
22
@@ -31,13 +32,16 @@ protected void addCompletions(@NotNull CompletionParameters parameters,
31
32
String prefix = result .getPrefixMatcher ().getPrefix ();
32
33
33
34
DiIndex index = DiIndex .getInstance (position .getProject ());
34
- Collection <String > elements = index .getAllVirtualTypeElementNames (new PlainPrefixMatcher (prefix ), position .getResolveScope ());
35
+ Collection <String > elements = index .getAllVirtualTypeElementNames (
36
+ new PlainPrefixMatcher (prefix ),
37
+ position .getResolveScope ()
38
+ );
35
39
36
40
for (String elementName :elements ) {
37
41
result .addElement (
38
42
LookupElementBuilder
39
43
.create (elementName )
40
- .withIcon (PhpIcons . CLASS_ICON )
44
+ .withIcon (AllIcons . Nodes . Class )
41
45
);
42
46
}
43
47
}
0 commit comments