Skip to content

Commit

Permalink
Update for 2023.2 support.
Browse files Browse the repository at this point in the history
Remove use of internal API.
  • Loading branch information
Layoric committed Aug 10, 2023
1 parent 327e4bf commit 27a3b66
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# ServiceStackIDEA Changelog

## [Unreleased]
- Add support for 2023.2
- Remove use of internal APIs
## [1.3.1]
- Add support for 2023.1
## [1.3.0]
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pluginGroup = ServiceStackIDEA
pluginName = ServiceStack
pluginVersion = 1.3.1
pluginVersion = 1.3.3

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private static boolean addGradleDependencyIfRequired(Module module,AnActionEvent
depAdded = true;

if (depAdded) {
IDEAUtils.refreshBuildFile(module);
//IDEAUtils.refreshBuildFile(module);
return true;
}
return false;
Expand Down
16 changes: 9 additions & 7 deletions src/main/java/net/servicestack/idea/common/IDEAUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
*/
public class IDEAUtils {

public static void refreshBuildFile(Module module) {
VirtualFileManager.getInstance().syncRefresh();
if(module.getModuleFile() == null) { return; }

refreshFile(module,module.getModuleFile().getParent().getUrl() + "/build.gradle",
false);
}
// `module.getModuleFile()` now an internal API that cannot be used.
// Removing to pass review.
// public static void refreshBuildFile(Module module) {
// VirtualFileManager.getInstance().syncRefresh();
// if(module.getModuleFile() == null) { return; }
//
// refreshFile(module,module.getModuleFile().getParent().getUrl() + "/build.gradle",
// false);
// }

public static void refreshProject(Module module) {
Project project = module.getProject();
Expand Down

0 comments on commit 27a3b66

Please sign in to comment.