diff --git a/src/com/magento/idea/magento2plugin/lang/psi/search/AllFilesExceptTestsScope.java b/src/com/magento/idea/magento2plugin/lang/psi/search/AllFilesExceptTestsScope.java index 99e523820..d4d8b5f36 100644 --- a/src/com/magento/idea/magento2plugin/lang/psi/search/AllFilesExceptTestsScope.java +++ b/src/com/magento/idea/magento2plugin/lang/psi/search/AllFilesExceptTestsScope.java @@ -16,33 +16,14 @@ public final class AllFilesExceptTestsScope extends GlobalSearchScope { public static final String SCOPE_NAME = "All Files Except Tests"; - private static AllFilesExceptTestsScope instance; private final Project project; - /** - * Get search scope instance. - * - * @param project Project - * - * @return AllFilesExceptTestsScope - */ - @SuppressWarnings("PMD.AvoidSynchronizedAtMethodLevel") - public static synchronized AllFilesExceptTestsScope getInstance( - final @Nullable Project project - ) { - if (instance == null) { - instance = new AllFilesExceptTestsScope(project); - } - - return instance; - } - /** * Magento search scope constructor. * * @param project Project */ - private AllFilesExceptTestsScope(final @Nullable Project project) { + public AllFilesExceptTestsScope(final @Nullable Project project) { super(project); this.project = project; } diff --git a/src/com/magento/idea/magento2plugin/lang/psi/search/MagentoSearchScopesProvider.java b/src/com/magento/idea/magento2plugin/lang/psi/search/MagentoSearchScopesProvider.java index 7e7898eaa..a4817d05c 100644 --- a/src/com/magento/idea/magento2plugin/lang/psi/search/MagentoSearchScopesProvider.java +++ b/src/com/magento/idea/magento2plugin/lang/psi/search/MagentoSearchScopesProvider.java @@ -32,6 +32,6 @@ public class MagentoSearchScopesProvider implements SearchScopeProvider { return Collections.emptyList(); } - return Collections.singletonList(AllFilesExceptTestsScope.getInstance(project)); + return Collections.singletonList(new AllFilesExceptTestsScope(project)); } }