diff --git a/src/main/java/io/zhile/research/intellij/action/ResetAction.java b/src/main/java/io/zhile/research/intellij/action/ResetAction.java index 980862d..77dcb29 100644 --- a/src/main/java/io/zhile/research/intellij/action/ResetAction.java +++ b/src/main/java/io/zhile/research/intellij/action/ResetAction.java @@ -83,7 +83,7 @@ public class ResetAction extends AnAction { File dir = Paths.get(appData, "JetBrains", fileName).toFile(); - return dir.delete(); + return !dir.exists() || dir.delete(); } protected File getEvalFile() { diff --git a/src/test/java/MyInterface.java b/src/test/java/MyInterface.java new file mode 100644 index 0000000..7426e1e --- /dev/null +++ b/src/test/java/MyInterface.java @@ -0,0 +1,3 @@ +public interface MyInterface { + public void test(); +} diff --git a/src/test/java/Tsss.java b/src/test/java/Tsss.java new file mode 100644 index 0000000..5d117c8 --- /dev/null +++ b/src/test/java/Tsss.java @@ -0,0 +1,20 @@ +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class Tsss { + List list = Arrays.asList(); + + public static void main(String[] args) { + new Tsss().add(new MyInterface() { + @Override + public void test() { + + } + }); + } + + public void add(MyInterface obj) { + list.add(obj); + } +}