File tree 2 files changed +10
-0
lines changed
src/com/magento/idea/magento2plugin/lang
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 14
14
import com .intellij .psi .html .HtmlTag ;
15
15
import com .intellij .psi .templateLanguages .OuterLanguageElement ;
16
16
import com .intellij .psi .xml .XmlText ;
17
+ import com .magento .idea .magento2plugin .project .Settings ;
17
18
import java .util .List ;
18
19
import org .jetbrains .annotations .NotNull ;
19
20
@@ -25,6 +26,10 @@ public void getLanguagesToInject(
25
26
final @ NotNull MultiHostRegistrar registrar ,
26
27
final @ NotNull PsiElement host
27
28
) {
29
+ if (!Settings .isEnabled (host .getProject ())) {
30
+ return ;
31
+ }
32
+
28
33
if (!isUiComponentTag (host )) {
29
34
return ;
30
35
}
Original file line number Diff line number Diff line change 10
10
import com .intellij .openapi .util .NlsContexts ;
11
11
import com .intellij .psi .search .SearchScope ;
12
12
import com .intellij .psi .search .SearchScopeProvider ;
13
+ import com .magento .idea .magento2plugin .project .Settings ;
13
14
import java .util .Collections ;
14
15
import java .util .List ;
15
16
import org .jetbrains .annotations .NotNull ;
@@ -27,6 +28,10 @@ public class MagentoSearchScopesProvider implements SearchScopeProvider {
27
28
final @ NotNull Project project ,
28
29
final @ NotNull DataContext dataContext
29
30
) {
31
+ if (!Settings .isEnabled (project )) {
32
+ return Collections .emptyList ();
33
+ }
34
+
30
35
return Collections .singletonList (AllFilesExceptTestsScope .getInstance (project ));
31
36
}
32
37
}
You can’t perform that action at this time.
0 commit comments