parent
65e19f94b7
commit
945d63e4ea
|
@ -1,3 +1,4 @@
|
||||||
|
.DS_Store
|
||||||
.idea/
|
.idea/
|
||||||
.gradle/
|
.gradle/
|
||||||
build/
|
build/
|
||||||
|
|
|
@ -4,7 +4,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'io.zhile.research.intellij'
|
group 'io.zhile.research.intellij'
|
||||||
version '1.0.4'
|
version '1.0.5'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -19,12 +19,14 @@ intellij {
|
||||||
// localPath "${System.properties['user.home']}/Applications/IntelliJ IDEA.app"
|
// localPath "${System.properties['user.home']}/Applications/IntelliJ IDEA.app"
|
||||||
// alternativeIdePath localPath
|
// alternativeIdePath localPath
|
||||||
|
|
||||||
version "2020.1.2"
|
version "2020.2.3"
|
||||||
type "IU"
|
type "IU"
|
||||||
}
|
}
|
||||||
|
|
||||||
patchPluginXml {
|
patchPluginXml {
|
||||||
changeNotes """
|
changeNotes """
|
||||||
|
release v1.0.5
|
||||||
|
1. update for 2020.2.x
|
||||||
release v1.0.4
|
release v1.0.4
|
||||||
1. reset completely
|
1. reset completely
|
||||||
release v1.0.3
|
release v1.0.3
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# reset jetbrains ide evals v1.0.4
|
# reset jetbrains ide evals v1.0.5
|
||||||
|
|
||||||
OS_NAME=$(uname -s)
|
OS_NAME=$(uname -s)
|
||||||
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode"
|
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
' reset jetbrains ide evals v1.0.4
|
' reset jetbrains ide evals v1.0.5
|
||||||
Set oShell = CreateObject("WScript.Shell")
|
Set oShell = CreateObject("WScript.Shell")
|
||||||
Set oFS = CreateObject("Scripting.FileSystemObject")
|
Set oFS = CreateObject("Scripting.FileSystemObject")
|
||||||
sHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
|
sHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
|
||||||
|
@ -53,9 +53,10 @@ On Error Resume Next
|
||||||
oShell.RegDelete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\/Jet/Brains./User/Id/On/Machine"
|
oShell.RegDelete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\/Jet/Brains./User/Id/On/Machine"
|
||||||
oShell.RegDelete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\device_id"
|
oShell.RegDelete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\device_id"
|
||||||
oShell.RegDelete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\user_id_on_machine"
|
oShell.RegDelete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\user_id_on_machine"
|
||||||
|
oShell.RegDelete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\"
|
||||||
oFs.DeleteFile sJBDataFolder + "\bl"
|
oFs.DeleteFile sJBDataFolder + "\bl"
|
||||||
oFs.DeleteFile sJBDataFolder + "\crl"
|
oFs.DeleteFile sJBDataFolder + "\crl"
|
||||||
oFs.DeleteFile sJBDataFolder + "\PermanentUserId"
|
oFs.DeleteFile sJBDataFolder + "\PermanentUserId"
|
||||||
oFs.DeleteFile sJBDataFolder + "\PermanentDeviceId"
|
oFs.DeleteFile sJBDataFolder + "\PermanentDeviceId"
|
||||||
|
|
||||||
MsgBox "done"
|
MsgBox "done"
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
import java.util.prefs.BackingStoreException;
|
||||||
import java.util.prefs.Preferences;
|
import java.util.prefs.Preferences;
|
||||||
|
|
||||||
public class ResetAction extends AnAction {
|
public class ResetAction extends AnAction {
|
||||||
|
@ -73,6 +74,13 @@ public class ResetAction extends AnAction {
|
||||||
prefs.remove(NEW_MACHINE_ID_KEY);
|
prefs.remove(NEW_MACHINE_ID_KEY);
|
||||||
prefs.remove(DEVICE_ID_KEY);
|
prefs.remove(DEVICE_ID_KEY);
|
||||||
|
|
||||||
|
try {
|
||||||
|
removeEvalNode(prefs);
|
||||||
|
} catch (BackingStoreException e) {
|
||||||
|
NotificationHelper.showError(project, "Remove evlsprt failed!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Preferences.userRoot().node(Constants.PLUGIN_NAME).put(Constants.PRODUCT_NAME + Constants.PRODUCT_HASH, Long.toString(System.currentTimeMillis()));
|
Preferences.userRoot().node(Constants.PLUGIN_NAME).put(Constants.PRODUCT_NAME + Constants.PRODUCT_HASH, Long.toString(System.currentTimeMillis()));
|
||||||
|
|
||||||
if (appInfo.isVendorJetBrains() && SystemInfo.isWindows) {
|
if (appInfo.isVendorJetBrains() && SystemInfo.isWindows) {
|
||||||
|
@ -118,4 +126,21 @@ public class ResetAction extends AnAction {
|
||||||
|
|
||||||
return new File(new File(configPath, "options"), "other.xml");
|
return new File(new File(configPath, "options"), "other.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void removeEvalNode(Preferences prefs) throws BackingStoreException {
|
||||||
|
String[] keys = prefs.childrenNames();
|
||||||
|
if (keys.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String key : keys) {
|
||||||
|
Preferences node = prefs.node(key);
|
||||||
|
if (key.startsWith("evlsprt")) {
|
||||||
|
node.removeNode();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
removeEvalNode(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue