-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into update-from-template-merged
- Loading branch information
Showing
73 changed files
with
3,475 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 1.0.2 | ||
* Drop support for IntelliJ < 2024.2 | ||
* Removed deprecated code that was only required for older IDE versions | ||
|
||
# 1.0.1 | ||
* Workaround scaling problem on "New UI" #19 | ||
* Drop support for IntelliJ < 2023.2 | ||
|
||
# 1.0.0 | ||
_Initial release_ | ||
* Execute recipes | ||
* with | ||
* Maven | ||
* Gradle | ||
* on a | ||
* (project) module | ||
* external directory | ||
* Supports IntelliJ 2023.1+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,38 @@ | ||
[![Latest version](https://img.shields.io/jetbrains/plugin/v/pluginId?logo=jetbrains)](https://plugins.jetbrains.com/plugin/pluginId) | ||
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/check-build.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/check-build.yml?query=branch%3Adevelop) | ||
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_template-placeholder&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_template-placeholder) | ||
[![Feel free to leave a rating](https://img.shields.io/jetbrains/plugin/r/rating/pluginId?style=social&logo=jetbrains&label=Feel%20free%20to%20leave%20a%20rating)](https://plugins.jetbrains.com/plugin/pluginId/reviews) | ||
[![Latest version](https://img.shields.io/jetbrains/plugin/v/23896?logo=jetbrains)](https://plugins.jetbrains.com/plugin/23896) | ||
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/intellij-plugin-openrewriter/check-build.yml?branch=develop)](https://github.com/xdev-software/intellij-plugin-openrewriter/actions/workflows/check-build.yml?query=branch%3Adevelop) | ||
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_intellij-plugin-openrewriter&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_intellij-plugin-openrewriter) | ||
[![Feel free to leave a rating](https://img.shields.io/jetbrains/plugin/r/rating/23896?style=social&logo=jetbrains&label=Feel%20free%20to%20leave%20a%20rating)](https://plugins.jetbrains.com/plugin/23896/reviews) | ||
|
||
# <img alt="Plugin icon" src="./src/main/resources/META-INF/pluginIcon.svg" height="30"> template-placeholder | ||
# <img alt="OpenRewriter Plugin icon light" src="./src/main/resources/META-INF/pluginIcon.svg" height="30"> OpenRewriter X | ||
|
||
Provides support for executing [OpenRewrite](https://github.com/openrewrite) recipes. | ||
|
||
<img alt="Demo" src="assets/demo.png" height="500" /> | ||
|
||
## Features | ||
|
||
* Execute recipes | ||
* with | ||
* Maven | ||
* Gradle | ||
* on a | ||
* (project) module | ||
* external directory | ||
|
||
<details> | ||
<summary>Show demo</summary> | ||
|
||
![demo](assets/demo.avif) | ||
</details> | ||
|
||
## Installation | ||
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation) | ||
[Installation guide for the latest release](https://github.com/xdev-software/intellij-plugin-openrewriter/releases/latest#Installation) | ||
|
||
> [!TIP] | ||
> [Development versions](https://plugins.jetbrains.com/plugin/pluginId/versions/snapshot) can be installed by [adding the ``snapshot`` release channel as a plugin repository](https://www.jetbrains.com/help/idea/managing-plugins.html#repos):<br/> | ||
> [Development versions](https://plugins.jetbrains.com/plugin/23896/versions/snapshot) can be installed by [adding the ``snapshot`` release channel as a plugin repository](https://www.jetbrains.com/help/idea/managing-plugins.html#repos):<br/> | ||
> ``https://plugins.jetbrains.com/plugins/snapshot/list`` | ||
## Contributing | ||
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project. | ||
|
||
<sub>Disclaimer: This is not an official OpenRewrite product and not associated with OpenRewrite</sub> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/software/xdev/openrewriter/executor/PresentableProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package software.xdev.openrewriter.executor; | ||
|
||
import javax.swing.Icon; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
import com.intellij.openapi.project.Project; | ||
|
||
import software.xdev.openrewriter.ui.toolwindow.execute.panels.ExecuteRecipeConfigPanel; | ||
|
||
|
||
public interface PresentableProvider<T> extends Provider | ||
{ | ||
Icon icon(); | ||
|
||
T createDefault(Project project); | ||
|
||
Class<T> matchingClass(); | ||
|
||
@Nullable | ||
ExecuteRecipeConfigPanel<? extends T> createConfigPanel(final Project project); | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/software/xdev/openrewriter/executor/Provider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package software.xdev.openrewriter.executor; | ||
|
||
public interface Provider | ||
{ | ||
String name(); | ||
|
||
default int orderPriority() | ||
{ | ||
return 10; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/software/xdev/openrewriter/executor/RecipesExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package software.xdev.openrewriter.executor; | ||
|
||
import com.intellij.openapi.module.Module; | ||
import com.intellij.openapi.project.Project; | ||
|
||
import software.xdev.openrewriter.executor.request.ExecutionRequest; | ||
|
||
|
||
public interface RecipesExecutor<T extends RecipesExecutorConfig> extends PresentableProvider<T> | ||
{ | ||
default boolean isAsync() | ||
{ | ||
return true; | ||
} | ||
|
||
boolean isMatchingModule(Project project, Module module); | ||
|
||
@SuppressWarnings("unchecked") | ||
default void execute(final Project project, final ExecutionRequest request) | ||
{ | ||
this.execute(project, request, (T)request.getExecutorConfig()); | ||
} | ||
|
||
void execute(Project project, ExecutionRequest request, T config); | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/software/xdev/openrewriter/executor/RecipesExecutorConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package software.xdev.openrewriter.executor; | ||
|
||
public interface RecipesExecutorConfig | ||
{ | ||
} |
50 changes: 50 additions & 0 deletions
50
src/main/java/software/xdev/openrewriter/executor/RecipesExecutorEPManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package software.xdev.openrewriter.executor; | ||
|
||
import java.util.Collection; | ||
import java.util.Comparator; | ||
import java.util.List; | ||
|
||
import com.intellij.openapi.extensions.ExtensionPointName; | ||
|
||
import software.xdev.openrewriter.executor.request.recipedata.RecipesDataProvider; | ||
import software.xdev.openrewriter.executor.request.target.ExecutionTargetProvider; | ||
|
||
|
||
public final class RecipesExecutorEPManager | ||
{ | ||
private static final ExtensionPointName<RecipesExecutor<?>> EP_RECIPES_EXECUTORS = | ||
ExtensionPointName.create("software.xdev.openrewriter.recipesExecutor"); | ||
|
||
private static final ExtensionPointName<ExecutionTargetProvider<?>> EP_EXECUTION_REQUEST_TARGET_PROVIDERS = | ||
ExtensionPointName.create("software.xdev.openrewriter.executionRequestTargetProvider"); | ||
|
||
private static final ExtensionPointName<RecipesDataProvider<?>> EP_RECIPES_DATA_PROVIDERS = | ||
ExtensionPointName.create("software.xdev.openrewriter.recipesDataProvider"); | ||
|
||
public static List<RecipesExecutor<?>> recipesExecutors() | ||
{ | ||
return order(EP_RECIPES_EXECUTORS.getExtensionList()); | ||
} | ||
|
||
public static List<ExecutionTargetProvider<?>> executionRequestTargetProviders() | ||
{ | ||
return order(EP_EXECUTION_REQUEST_TARGET_PROVIDERS.getExtensionList()); | ||
} | ||
|
||
@SuppressWarnings("java:S1452") | ||
public static List<RecipesDataProvider<?>> recipesDataProviders() | ||
{ | ||
return order(EP_RECIPES_DATA_PROVIDERS.getExtensionList()); | ||
} | ||
|
||
private static <T extends Provider> List<T> order(final Collection<T> input) | ||
{ | ||
return input.stream() | ||
.sorted(Comparator.comparing(Provider::orderPriority)) | ||
.toList(); | ||
} | ||
|
||
private RecipesExecutorEPManager() | ||
{ | ||
} | ||
} |
Oops, something went wrong.