File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
CodeLocatorPlugin/src/main/java/com/bytedance/tools/codelocator Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ class OpenDocAction :
13
13
override fun isEnable (e : AnActionEvent ) = true
14
14
15
15
override fun actionPerformed (e : AnActionEvent ) {
16
+ val config = CodeLocatorUserConfig .loadConfig()
17
+ val docUrl = if (config.isEnglish()) {
18
+ NetUtils .DOC_URL_EN
19
+ } else {
20
+ NetUtils .DOC_URL
21
+ }
16
22
IdeaUtils .openBrowser(e.project, NetUtils .DOC_URL )
17
23
Mob .mob(Mob .Action .CLICK , Mob .Button .DOC )
18
24
}
Original file line number Diff line number Diff line change @@ -448,6 +448,10 @@ public void setAutoFormatCode(boolean autoFormatCode) {
448
448
this .autoFormatCode = autoFormatCode ;
449
449
}
450
450
451
+ public boolean isEnglish () {
452
+ return this .res == "en"
453
+ }
454
+
451
455
@ NotNull
452
456
public static CodeLocatorUserConfig loadConfig () {
453
457
if (sCodeLocatorConfig != null ) {
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ public class NetUtils {
19
19
20
20
public static final String DOC_URL = "https://github.com/bytedance/CodeLocator/blob/main/how_to_use_codelocator_zh.md" ;
21
21
22
+ public static final String DOC_URL_EN = "https://github.com/bytedance/CodeLocator/blob/main/how_to_use_codelocator.md" ;
23
+
22
24
public static final String SERVER_URL = "https://c76297c446.goho.co/log.php" ;
23
25
24
26
public static final String FILE_SERVER_URL = "https://c76297c446.goho.co/upload.php" ;
You can’t perform that action at this time.
0 commit comments