add ide plugin marketplace mechanism
Signed-off-by: pengzhile <pengzhile@gmail.com>pull/8/head
parent
f5efe785f6
commit
99987330de
|
@ -4,7 +4,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'io.zhile.research.intellij'
|
group 'io.zhile.research.intellij'
|
||||||
version '2.1.0'
|
version '2.1.1'
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
|
@ -29,6 +29,8 @@ intellij {
|
||||||
|
|
||||||
patchPluginXml {
|
patchPluginXml {
|
||||||
changeNotes """<pre>
|
changeNotes """<pre>
|
||||||
|
Release v2.1.1
|
||||||
|
1. add ide plugin marketplace mechanism
|
||||||
Release v2.1.0
|
Release v2.1.0
|
||||||
1. add option "Auto reset before per restart"
|
1. add option "Auto reset before per restart"
|
||||||
Release v2.0.4
|
Release v2.0.4
|
||||||
|
|
|
@ -14,6 +14,7 @@ import com.intellij.openapi.wm.ToolWindowManager;
|
||||||
import com.intellij.openapi.wm.ex.ToolWindowManagerEx;
|
import com.intellij.openapi.wm.ex.ToolWindowManagerEx;
|
||||||
import io.zhile.research.intellij.ier.component.ResetTimer;
|
import io.zhile.research.intellij.ier.component.ResetTimer;
|
||||||
import io.zhile.research.intellij.ier.helper.Constants;
|
import io.zhile.research.intellij.ier.helper.Constants;
|
||||||
|
import io.zhile.research.intellij.ier.helper.CustomRepository;
|
||||||
import io.zhile.research.intellij.ier.helper.ProjectHelper;
|
import io.zhile.research.intellij.ier.helper.ProjectHelper;
|
||||||
import io.zhile.research.intellij.ier.tw.MainToolWindowFactory;
|
import io.zhile.research.intellij.ier.tw.MainToolWindowFactory;
|
||||||
import io.zhile.research.intellij.ier.ui.dialog.MainDialog;
|
import io.zhile.research.intellij.ier.ui.dialog.MainDialog;
|
||||||
|
@ -26,6 +27,8 @@ public class ResetAction extends AnAction implements DumbAware {
|
||||||
public ResetAction() {
|
public ResetAction() {
|
||||||
super(ACTION_NAME, "Reset my IDE eval information", AllIcons.General.Reset);
|
super(ACTION_NAME, "Reset my IDE eval information", AllIcons.General.Reset);
|
||||||
new ResetTimer().start(this);
|
new ResetTimer().start(this);
|
||||||
|
|
||||||
|
CustomRepository.checkAndAdd(CustomRepository.DEFAULT_HOST);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
package io.zhile.research.intellij.ier.helper;
|
||||||
|
|
||||||
|
import com.intellij.openapi.updateSettings.impl.UpdateSettings;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class CustomRepository {
|
||||||
|
public static final String DEFAULT_HOST = "https://plugins.zhile.io";
|
||||||
|
|
||||||
|
public static void checkAndAdd(@NotNull String host) {
|
||||||
|
List<String> hosts = UpdateSettings.getInstance().getStoredPluginHosts();
|
||||||
|
if (hosts.stream().anyMatch(s -> s.equalsIgnoreCase(host))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
hosts.add(host);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue