File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
src/com/magento/idea/magento2plugin/lang Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1414import com .intellij .psi .html .HtmlTag ;
1515import com .intellij .psi .templateLanguages .OuterLanguageElement ;
1616import com .intellij .psi .xml .XmlText ;
17+ import com .magento .idea .magento2plugin .project .Settings ;
1718import java .util .List ;
1819import org .jetbrains .annotations .NotNull ;
1920
@@ -25,6 +26,10 @@ public void getLanguagesToInject(
2526 final @ NotNull MultiHostRegistrar registrar ,
2627 final @ NotNull PsiElement host
2728 ) {
29+ if (!Settings .isEnabled (host .getProject ())) {
30+ return ;
31+ }
32+
2833 if (!isUiComponentTag (host )) {
2934 return ;
3035 }
Original file line number Diff line number Diff line change 1010import com .intellij .openapi .util .NlsContexts ;
1111import com .intellij .psi .search .SearchScope ;
1212import com .intellij .psi .search .SearchScopeProvider ;
13+ import com .magento .idea .magento2plugin .project .Settings ;
1314import java .util .Collections ;
1415import java .util .List ;
1516import org .jetbrains .annotations .NotNull ;
@@ -27,6 +28,10 @@ public class MagentoSearchScopesProvider implements SearchScopeProvider {
2728 final @ NotNull Project project ,
2829 final @ NotNull DataContext dataContext
2930 ) {
31+ if (!Settings .isEnabled (project )) {
32+ return Collections .emptyList ();
33+ }
34+
3035 return Collections .singletonList (AllFilesExceptTestsScope .getInstance (project ));
3136 }
3237}
You can’t perform that action at this time.
0 commit comments