Skip to content

Commit f595d1b

Browse files
authoredSep 14, 2022
Merge pull request #1147 from magento/pre-release-4.4.0
4.4.0 pre release
2 parents 8195d9f + e1afca4 commit f595d1b

File tree

10 files changed

+226
-89
lines changed

10 files changed

+226
-89
lines changed
 

‎CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,49 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
66

77
## 4.4.0
88

9+
### Added
10+
11+
- Code generation of a Data Patch file with a Customer EAV attribute [#583](https://github.com/magento/magento2-phpstorm-plugin/pull/583)
12+
- Code generation of a Data Patch file with a Product EAV attribute [#527](https://github.com/magento/magento2-phpstorm-plugin/pull/527)
13+
- Code generation of a Data Patch file with a Category EAV attribute [#569](https://github.com/magento/magento2-phpstorm-plugin/pull/569)
14+
- Code generation of Readme file [#1133](https://github.com/magento/magento2-phpstorm-plugin/pull/1133)
15+
- Code generation of GraphQl schema file [#1123](https://github.com/magento/magento2-phpstorm-plugin/pull/1123)
16+
- Optional generation of Readme file during the creation of a new module [#1110](https://github.com/magento/magento2-phpstorm-plugin/pull/1110)
17+
- Code completion for `system.xml` and `config.xml` [#1077](https://github.com/magento/magento2-phpstorm-plugin/pull/1077)
18+
- Added easier navigation through plugins [#1121](https://github.com/magento/magento2-phpstorm-plugin/pull/1121)
19+
- Added inspection to check if type attr value in the virtual type tag attribute value exists [#1176](https://github.com/magento/magento2-phpstorm-plugin/pull/1176)
20+
- Added checks and detailed error messages during plugin activation [#1181](https://github.com/magento/magento2-phpstorm-plugin/pull/1181)
21+
22+
### Fixed
23+
24+
- Fixed NullPointerException at ObserverDeclarationInspection.java:188 [#1143](https://github.com/magento/magento2-phpstorm-plugin/issues/1143)
25+
- Fixed IncorrectOperationException: Rebind cannot be performed for class PolyVariantReferenceBase [#1173](https://github.com/magento/magento2-phpstorm-plugin/pull/1173)
26+
- Fixed create an observer for an event doesn't work through the context menu [#1166](https://github.com/magento/magento2-phpstorm-plugin/pull/1166)
27+
- Fixed IOException: Invalid file name at ReportBuilder [#1154](https://github.com/magento/magento2-phpstorm-plugin/pull/1154)
28+
- Fixed IllegalArgumentException in NewModuleAction class [#1150](https://github.com/magento/magento2-phpstorm-plugin/pull/1150)
29+
- Fixed null data in ModuleIndex class [#1132](https://github.com/magento/magento2-phpstorm-plugin/pull/1132)
30+
- Fixed StringIndexOutOfBoundsException: GitHubNewIssueBodyBuilderUtil [#1130](https://github.com/magento/magento2-phpstorm-plugin/pull/1130)
31+
- Fixed ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 0 in OverrideClassByAPreferenceDialog [#1129](https://github.com/magento/magento2-phpstorm-plugin/pull/1129)
32+
- Fixed PatternSyntaxException: MagentoBasePathUtil.isMagentoFolderValid:35 for Windows styled dir path separator [#1126](https://github.com/magento/magento2-phpstorm-plugin/pull/1126)
33+
- Fixed NullPointerException in the OverrideTemplateInThemeAction.isOverrideAllowed for virtualFile.getCanonicalPath() [#1125](https://github.com/magento/magento2-phpstorm-plugin/pull/1125)
34+
- Fixed IllegalArgumentException: Argument for @NotNull parameter 'dataKey' must not be null in CompareTemplateAction [#1117](https://github.com/magento/magento2-phpstorm-plugin/pull/1117)
35+
- Fixed argument for @NotNull parameter 'project' must not be null in the OverrideClassByAPreferenceAction [#1116](https://github.com/magento/magento2-phpstorm-plugin/pull/1116)
36+
- Fixed New layout action doesn't accept valid layout names [#1114](https://github.com/magento/magento2-phpstorm-plugin/pull/1114)
37+
38+
## 4.3.1
39+
40+
### Changed
41+
42+
- Added raw plugin verifier configuration in [#1065](https://github.com/magento/magento2-phpstorm-plugin/pull/1065)
43+
44+
### Fixed
45+
46+
- Fixed bug with the file separator on Windows OS (while saving plugin settings) in [#1062](https://github.com/magento/magento2-phpstorm-plugin/pull/1062)
47+
- Fixed bug with wrong text range for FilePathReferenceProvider.getReferencesByElement in [#1063](https://github.com/magento/magento2-phpstorm-plugin/pull/1063)
48+
- Fixed module files action group is accessible from the theme context in [#1064](https://github.com/magento/magento2-phpstorm-plugin/pull/1064)
49+
- Fixed bug with directory index is already disposed for Project in AllFilesExceptTestsScope.contains in [#1080](https://github.com/magento/magento2-phpstorm-plugin/pull/1080)
50+
- Fixed bug with DumbService cannot be created because container is already disposed in MagentoComponentManager.getComponents in [#1081](https://github.com/magento/magento2-phpstorm-plugin/pull/1081)
51+
952
## 4.3.0
1053

1154
### Added

‎src/com/magento/idea/magento2plugin/actions/context/AbstractContextAction.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
import com.intellij.psi.PsiFile;
2121
import com.magento.idea.magento2plugin.MagentoIcons;
2222
import com.magento.idea.magento2plugin.magento.files.ModuleFileInterface;
23+
import com.magento.idea.magento2plugin.magento.packages.ComponentType;
2324
import com.magento.idea.magento2plugin.magento.packages.Package;
25+
import com.magento.idea.magento2plugin.project.Settings;
2426
import com.magento.idea.magento2plugin.util.magento.GetMagentoModuleUtil;
2527
import org.jetbrains.annotations.NotNull;
2628
import org.jetbrains.annotations.Nullable;
@@ -50,13 +52,14 @@ public AbstractContextAction(
5052
}
5153

5254
@Override
55+
@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.NPathComplexity"})
5356
public void update(final @NotNull AnActionEvent event) {
5457
event.getPresentation().setEnabled(false);
5558
event.getPresentation().setVisible(false);
5659

5760
final Project project = event.getProject();
5861

59-
if (project == null) {
62+
if (project == null || !Settings.isEnabled(project)) {
6063
return;
6164
}
6265
final DataContext context = event.getDataContext();
@@ -86,6 +89,12 @@ public void update(final @NotNull AnActionEvent event) {
8689
|| !isVisible(moduleData, targetDirectory, targetFile)) {
8790
return;
8891
}
92+
93+
if (moduleData.getType().equals(ComponentType.module)
94+
&& !GetMagentoModuleUtil.isEditableModule(moduleData)) {
95+
return;
96+
}
97+
8998
customDataContext = SimpleDataContext
9099
.builder()
91100
.add(

‎src/com/magento/idea/magento2plugin/actions/groups/NewModuleFileGroup.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.magento.idea.magento2plugin.actions.generation.util.IsClickedDirectoryInsideProject;
1717
import com.magento.idea.magento2plugin.indexes.ModuleIndex;
1818
import com.magento.idea.magento2plugin.project.Settings;
19+
import com.magento.idea.magento2plugin.util.magento.GetMagentoModuleUtil;
1920
import com.magento.idea.magento2plugin.util.magento.GetModuleNameByDirectoryUtil;
2021
import javax.swing.Icon;
2122
import org.jetbrains.annotations.NotNull;
@@ -62,7 +63,8 @@ public void update(final AnActionEvent event) {
6263
final PsiDirectory moduleDirectory = new ModuleIndex(project)
6364
.getModuleDirectoryByModuleName(moduleName);
6465

65-
if (moduleDirectory != null) {
66+
if (moduleDirectory != null
67+
&& GetMagentoModuleUtil.isDirectoryInEditableModule(moduleDirectory)) {
6668
event.getPresentation().setVisible(true);
6769
return;
6870
}

‎src/com/magento/idea/magento2plugin/lang/psi/search/AllFilesExceptTestsScope.java

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,14 @@
1616
public final class AllFilesExceptTestsScope extends GlobalSearchScope {
1717

1818
public static final String SCOPE_NAME = "All Files Except Tests";
19-
private static AllFilesExceptTestsScope instance;
2019
private final Project project;
2120

22-
/**
23-
* Get search scope instance.
24-
*
25-
* @param project Project
26-
*
27-
* @return AllFilesExceptTestsScope
28-
*/
29-
@SuppressWarnings("PMD.AvoidSynchronizedAtMethodLevel")
30-
public static synchronized AllFilesExceptTestsScope getInstance(
31-
final @Nullable Project project
32-
) {
33-
if (instance == null) {
34-
instance = new AllFilesExceptTestsScope(project);
35-
}
36-
37-
return instance;
38-
}
39-
4021
/**
4122
* Magento search scope constructor.
4223
*
4324
* @param project Project
4425
*/
45-
private AllFilesExceptTestsScope(final @Nullable Project project) {
26+
public AllFilesExceptTestsScope(final @Nullable Project project) {
4627
super(project);
4728
this.project = project;
4829
}

‎src/com/magento/idea/magento2plugin/lang/psi/search/MagentoSearchScopesProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ public class MagentoSearchScopesProvider implements SearchScopeProvider {
3232
return Collections.emptyList();
3333
}
3434

35-
return Collections.singletonList(AllFilesExceptTestsScope.getInstance(project));
35+
return Collections.singletonList(new AllFilesExceptTestsScope(project));
3636
}
3737
}

0 commit comments

Comments
 (0)