fix issue with JRebel

master
pengzhile 2021-07-28 19:24:40 +08:00
parent 7158a212df
commit b3dfb382c9
5 changed files with 15 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# Reset Your IDE Eval Information
1. Download and install plugin from [Download Link](https://plugins.zhile.io/files/ide-eval-resetter-2.2.1-435328.zip).
1. Download and install plugin from [Download Link](https://plugins.zhile.io/files/ide-eval-resetter-2.2.2-940eb7.zip).
* Alternative installation method:
* Add "Custom Plugin Repository": `https://plugins.zhile.io` manually (`Settings/Preferences` -> `Plugins`)
* Search and install plugin: `IDE Eval Reset`

View File

@ -4,7 +4,7 @@ plugins {
}
group 'io.zhile.research.intellij'
version '2.2.1'
version '2.2.2'
sourceCompatibility = 1.7
targetCompatibility = 1.7
@ -29,6 +29,8 @@ intellij {
patchPluginXml {
changeNotes = """<pre>
Release v2.2.2
1. fix issue with JRebel
Release v2.2.1
1. fix depends
Release v2.2.0

View File

@ -31,7 +31,6 @@ public class AppEventListener implements AppLifecycleListener {
}
public void appClosing() {
ListenerConnector.dispose();
BrokenPlugins.fix();
if (!Resetter.isAutoReset()) {

View File

@ -8,15 +8,21 @@ import io.zhile.research.intellij.ier.helper.Constants;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
public class AppInitListener implements AppLifecycleListener {
public void appFrameCreated(String[] commandLineArgs, @NotNull Ref<Boolean> willOpenProject) {
}
public void appStarting(@Nullable Project projectFromCommandLine) {
public void appFrameCreated(@NotNull List<String> commandLineArgs) {
ActionManager.getInstance().getAction(Constants.RESET_ACTION_ID);
}
public void appStarting(@Nullable Project projectFromCommandLine) {
}
public void projectFrameClosed() {
}

View File

@ -2,6 +2,7 @@ package io.zhile.research.intellij.ier.listener;
import com.intellij.ide.AppLifecycleListener;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ApplicationActivationListener;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.util.Disposer;
@ -20,8 +21,10 @@ public class ListenerConnector {
BrokenPlugins.fix();
CustomRepository.checkAndAdd(CustomRepository.DEFAULT_HOST);
Application app = ApplicationManager.getApplication();
disposable = Disposer.newDisposable();
MessageBusConnection connection = ApplicationManager.getApplication().getMessageBus().connect(disposable);
Disposer.register(app, disposable);
MessageBusConnection connection = app.getMessageBus().connect(disposable);
connection.subscribe(AppLifecycleListener.TOPIC, new AppEventListener());
connection.subscribe(ApplicationActivationListener.TOPIC, new AppActivationListener());
}