Skip to content

Commit

Permalink
fix #708, fix #712, close #713
Browse files Browse the repository at this point in the history
  • Loading branch information
shuzijun committed May 15, 2024
1 parent 8cf7b35 commit 6f950d4
Show file tree
Hide file tree
Showing 17 changed files with 264 additions and 75 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java-library'
id 'org.jetbrains.intellij' version '1.14.2'
id("org.jetbrains.kotlin.jvm") version "1.9.23"
id 'org.jetbrains.changelog' version "1.3.1"
id "de.undercouch.download" version "4.0.2"
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pluginUntilBuild =
pluginDescription = doc/description.html

platformType = IU
platformVersion = 2022.1
platformVersion = 2022.2

# ,-Dide.browser.jcef.log.level=verbose,-Duser.language=en-US
runIdeJvmArgs = -Dfile.encoding=utf-8
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.shuzijun.leetcode.plugin.actions;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.options.ShowSettingsUtil;
Expand Down Expand Up @@ -47,5 +48,10 @@ public void run(@NotNull ProgressIndicator progressIndicator) {

}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

public abstract void actionPerformed(AnActionEvent anActionEvent, Config config);
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.shuzijun.leetcode.plugin.actions.editor;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.vfs.VirtualFile;
import com.shuzijun.leetcode.plugin.model.LeetcodeEditor;
import com.shuzijun.leetcode.plugin.setting.ProjectConfig;
import org.jetbrains.annotations.NotNull;

/**
* @author shuzijun
Expand All @@ -24,4 +26,9 @@ public void update(AnActionEvent e) {
}
e.getPresentation().setEnabledAndVisible(menuAllowed);
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.shuzijun.leetcode.plugin.actions.toolbar;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.ToggleAction;
import com.intellij.openapi.project.DumbAware;
import com.shuzijun.leetcode.plugin.manager.NavigatorAction;
import com.shuzijun.leetcode.plugin.utils.DataKeys;
import com.shuzijun.leetcode.plugin.window.WindowFactory;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;

Expand Down Expand Up @@ -46,4 +48,8 @@ public void setSelected(AnActionEvent anActionEvent, boolean b) {
panel.setVisible(b);
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.Lists;
import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAware;
Expand All @@ -13,6 +14,7 @@
import com.shuzijun.leetcode.plugin.utils.DataKeys;
import com.shuzijun.leetcode.plugin.window.WindowFactory;
import icons.LeetCodeEditorIcons;
import org.jetbrains.annotations.NotNull;

import java.util.List;

Expand Down Expand Up @@ -97,4 +99,9 @@ private String getFilterKey(String id) {
private String getKey(String id) {
return id.replace(PluginConstant.LEETCODE_FIND_PREFIX, "").replace(PluginConstant.LEETCODE_ALL_FIND_PREFIX, "").replace(PluginConstant.LEETCODE_CODETOP_FIND_PREFIX, "");
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.shuzijun.leetcode.plugin.actions.toolbar;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.ToggleAction;
import com.intellij.openapi.progress.ProgressIndicator;
Expand Down Expand Up @@ -61,5 +62,10 @@ public void run(@NotNull ProgressIndicator progressIndicator) {
});
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}


}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.shuzijun.leetcode.plugin.actions.tree;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.ToggleAction;
import com.intellij.openapi.progress.ProgressIndicator;
Expand Down Expand Up @@ -65,4 +66,9 @@ public void run(@NotNull ProgressIndicator progressIndicator) {
});

}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.Lists;
import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAware;
Expand All @@ -10,6 +11,7 @@
import com.shuzijun.leetcode.plugin.model.Tag;
import com.shuzijun.leetcode.plugin.utils.DataKeys;
import com.shuzijun.leetcode.plugin.window.WindowFactory;
import org.jetbrains.annotations.NotNull;

import java.util.List;

Expand Down Expand Up @@ -39,4 +41,9 @@ public AnAction[] getChildren(AnActionEvent anActionEvent) {

}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void savePassword(String password, String username) {
if (username == null || password == null) {
return;
}
PasswordSafe.getInstance().set(new CredentialAttributes(PluginConstant.PLUGIN_ID, username, this.getClass()), new Credentials(username, password == null ? "" : password));
PasswordSafe.getInstance().set(new CredentialAttributes(PluginConstant.PLUGIN_ID, username, this.getClass()), new Credentials(username, password));
}

public String getPassword(String username) {
Expand Down
Loading

0 comments on commit 6f950d4

Please sign in to comment.