Skip to content

Commit

Permalink
Merge branch '5.3.0-develop' into fix/full-text-search
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliyBoyko authored Aug 11, 2024
2 parents f22b233 + e0af1c5 commit c9ef89b
Show file tree
Hide file tree
Showing 53 changed files with 377 additions and 104 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).

## 5.3.0

## 5.2.0

### Fixed

- Fixed action update thread deprecation [#2072](https://github.com/magento/magento2-phpstorm-plugin/pull/2072)
- Fixed compatibility with 2024.1 [#2071](https://github.com/magento/magento2-phpstorm-plugin/pull/2071)

## 5.1.0

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

1. Check out this repository
1. Open a folder with the project in the IntelliJ Ultimate using the `open` action button.
1. Make sure that you on the latest develop branch (e.g `5.2.0-develop`)
1. Make sure that you on the latest develop branch (e.g `5.3.0-develop`)
1. Right-click on the `build.gradle` file, choose "Import Gradle project" (if this is not exist look for "Build module '<root folder name>'") (you need to have Gradle plugin installed)
1. Check if the right SDK version is used for the project.
- Current Java version for the project is **java 11**, so you should additionally download **SDK 11** and choose it in the module settings: `Right click by the project root > Open Module Settings > Project Settings > Project > Project SDK`
Expand Down
18 changes: 10 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,33 @@
*/

plugins {
id 'org.jetbrains.intellij' version '1.13.3'
id 'org.jetbrains.intellij' version '1.17.3'
id 'checkstyle'
id 'pmd'
id 'org.jetbrains.changelog' version '2.0.0'
id 'org.jetbrains.changelog' version '2.2.0'
}

repositories {
mavenCentral()
}

group 'com.magento.idea'
version '5.2.0'
version '5.3.0'

apply plugin: 'org.jetbrains.intellij'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'groovy'
apply plugin: 'org.jetbrains.changelog'

def phpPluginVersion = System.getProperty("phpPluginVersion", "231.8109.199")
def ideaVersion = System.getProperty("ideaVersion", "2023.1")
def phpPluginVersion = System.getProperty("phpPluginVersion", "241.14494.158")
def ideaVersion = System.getProperty("ideaVersion", "2024.1")
def javaVersion = 17

sourceCompatibility = javaVersion
targetCompatibility = javaVersion
java {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}

intellij {
version = ideaVersion
Expand All @@ -41,7 +43,7 @@ intellij {
'properties',
'com.intellij.css',
'JavaScript',
'com.intellij.lang.jsgraphql:3.4.0',
'com.intellij.lang.jsgraphql:241.14494.150',
'platform-images',
'copyright'
]
Expand Down
12 changes: 6 additions & 6 deletions gradle-tasks/staticChecks.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,34 @@ pmd {
ruleSets = []
}

tasks.withType(Checkstyle) {
tasks.withType(Checkstyle).configureEach {
// Specify all files that should be checked
classpath = files()
source "${project.rootDir}"
}

// Execute Checkstyle on all files
task checkstyle(type: Checkstyle) {
tasks.register('checkstyle', Checkstyle) {
}

// Execute Checkstyle on all modified files
task checkstyleCI(type: Checkstyle) {
tasks.register('checkstyleCI', Checkstyle) {
def changedFiles = getChangedFiles()
include changedFiles
}

tasks.withType(Pmd) {
tasks.withType(Pmd).configureEach {
// Specify all files that should be checked
classpath = files()
source "${project.rootDir}"
}

// Execute Checkstyle on all files
task pmd(type: Pmd) {
tasks.register('pmd', Pmd) {
}

// Execute Checkstyle on all modified files
task pmdCI(type: Pmd) {
tasks.register('pmdCI', Pmd) {
def changedFiles = getChangedFiles()
include changedFiles
}
Expand Down
4 changes: 2 additions & 2 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<idea-plugin require-restart="true">
<id>com.magento.idea.magento2plugin</id>
<name>Magento PhpStorm</name>
<version>5.2.0</version>
<version>5.3.0</version>
<vendor url="https://github.com/magento/magento2-phpstorm-plugin">Magento Inc.</vendor>

<description><![CDATA[
Expand All @@ -24,7 +24,7 @@
</change-notes>

<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Build+Number+Ranges for description -->
<idea-version since-build="231.8109.175"/>
<idea-version since-build="241.14494.158"/>

<!-- please see http://confluence.jetbrains.com/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
on how to target different products -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.intellij.diff.DiffDialogHints;
import com.intellij.diff.DiffManager;
import com.intellij.diff.chains.DiffRequestChain;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
Expand Down Expand Up @@ -143,4 +144,9 @@ private void setStatus(final AnActionEvent event, final boolean status) {
event.getPresentation().setVisible(status);
event.getPresentation().setEnabled(status);
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.intellij.ide.fileTemplates.FileTemplateManager;
import com.intellij.ide.fileTemplates.actions.AttributesDefaults;
import com.intellij.ide.fileTemplates.actions.CreateFromTemplateActionBase;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.DataKey;
Expand Down Expand Up @@ -70,6 +71,11 @@ public AbstractContextAction(
this.moduleFile = moduleFile;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

@Override
@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.NPathComplexity"})
public void update(final @NotNull AnActionEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package com.magento.idea.magento2plugin.actions.context;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
Expand Down Expand Up @@ -82,6 +83,11 @@ public void update(final @NotNull AnActionEvent event) {
return file;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

/**
* Implement check if an action should be shown in the context defined by the module,
* target directory or target file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package com.magento.idea.magento2plugin.actions.context.xml;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataContext;
Expand Down Expand Up @@ -94,6 +95,11 @@ public void actionPerformed(final @NotNull AnActionEvent event) {
NewLayoutTemplateDialog.open(event.getProject(), targetDirectory);
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

/**
* Set is action available for event.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

package com.magento.idea.magento2plugin.actions.generation;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.ActionUpdateThreadAware;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.editor.Caret;
Expand All @@ -24,7 +26,7 @@
import com.magento.idea.magento2plugin.util.magento.plugin.IsPluginAllowedForMethodUtil;
import org.jetbrains.annotations.NotNull;

public class CreateAPluginAction extends DumbAwareAction {
public class CreateAPluginAction extends DumbAwareAction implements ActionUpdateThreadAware {

public static final String ACTION_NAME = "Create a new Plugin";
public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Plugin";
Expand Down Expand Up @@ -90,6 +92,11 @@ public boolean isDumbAware() {
return false;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

private Pair<PsiFile, PhpClass> findPhpClass(final @NotNull AnActionEvent event) {
final PsiFile psiFile = event.getData(PlatformDataKeys.PSI_FILE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
package com.magento.idea.magento2plugin.actions.generation;

import com.intellij.lang.ASTNode;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.ActionUpdateThreadAware;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.editor.Caret;
Expand All @@ -28,7 +30,8 @@
import com.magento.idea.magento2plugin.project.Settings;
import org.jetbrains.annotations.NotNull;

public class CreateAnObserverAction extends DumbAwareAction {
public class CreateAnObserverAction extends DumbAwareAction
implements ActionUpdateThreadAware {

public static final String ACTION_NAME = "Create a new Observer for this event";
public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Observer";
Expand Down Expand Up @@ -87,6 +90,11 @@ public boolean isDumbAware() {
return false;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

private PsiElement getElement(final @NotNull AnActionEvent event) {
final Caret caret = event.getData(PlatformDataKeys.CARET);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

package com.magento.idea.magento2plugin.actions.generation;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.ActionUpdateThreadAware;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.editor.Caret;
Expand All @@ -21,7 +23,7 @@
import com.magento.idea.magento2plugin.project.Settings;
import org.jetbrains.annotations.NotNull;

public class InjectAViewModelAction extends DumbAwareAction {
public class InjectAViewModelAction extends DumbAwareAction implements ActionUpdateThreadAware {

public static final String ACTION_NAME = "Inject a new View Model for this block";
public static final String ACTION_DESCRIPTION = "Inject a new Magento 2 View Model";
Expand Down Expand Up @@ -68,6 +70,11 @@ public boolean isDumbAware() {
return false;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

/**
* Get focused (target) element for the event.
*
Expand Down Expand Up @@ -98,7 +105,7 @@ private XmlTag getElement(final @NotNull AnActionEvent event) {
if (xmlTag == null) {
return null;
}
XmlTag resultTag;
final XmlTag resultTag;

if (CommonXml.ATTRIBUTE_ARGUMENTS.equals(xmlTag.getName())) {
resultTag = PsiTreeUtil.getParentOfType(xmlTag, XmlTag.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package com.magento.idea.magento2plugin.actions.generation;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
Expand Down Expand Up @@ -92,6 +93,11 @@ public void actionPerformed(final @NotNull AnActionEvent event) {
);
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

/**
* Set is action available for event.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.magento.idea.magento2plugin.actions.generation;

import com.intellij.ide.IdeView;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
Expand Down Expand Up @@ -52,4 +53,9 @@ public void actionPerformed(final @NotNull AnActionEvent event) {
public boolean isDumbAware() {
return false;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.magento.idea.magento2plugin.actions.generation;

import com.intellij.ide.IdeView;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
Expand Down Expand Up @@ -51,4 +52,9 @@ public void actionPerformed(final @NotNull AnActionEvent event) {
public boolean isDumbAware() {
return false;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.magento.idea.magento2plugin.actions.generation;

import com.intellij.ide.IdeView;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
Expand All @@ -15,6 +16,7 @@
import com.intellij.psi.PsiDirectory;
import com.magento.idea.magento2plugin.MagentoIcons;
import com.magento.idea.magento2plugin.actions.generation.dialog.NewControllerDialog;
import org.jetbrains.annotations.NotNull;

public class NewControllerAction extends AnAction {

Expand Down Expand Up @@ -54,4 +56,9 @@ public void actionPerformed(final AnActionEvent event) {
public boolean isDumbAware() {
return false;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Loading

0 comments on commit c9ef89b

Please sign in to comment.