File tree Expand file tree Collapse file tree 2 files changed +11
-19
lines changed
src/com/shuzijun/leetcode/plugin/actions Expand file tree Collapse file tree 2 files changed +11
-19
lines changed Original file line number Diff line number Diff line change 11<idea-plugin >
22 <id >leetcode-editor</id >
33 <name >leetcode editor</name >
4- <version >4.4 </version >
4+ <version >4.3 </version >
55 <vendor email =" shuzijun0109@gmail.com" url =" https://github.com/shuzijun/idea-leetcode-plugin" >shuzijun</vendor >
66
77 <description ><![CDATA[
102102
103103 <change-notes ><![CDATA[
104104 <ul>
105- <li>v4.4<br>
106- 1.增加跳转到题目对应的leetcode官网地址的功能<br>
107- </li>
108- <li>v4.4<br>
109- 1.add a new feature of browsing certain question on the website of leetcode<br>
110- </li>
111-
112105 <li>v4.3<br>
113106 1.修复付费用户订阅题目展示<br>
114107 2.修复leetcode-cn.com登陆问题<br>
108+ 3.增加跳转到题目对应的leetcode官网地址的功能<br>
115109 </li>
116110 <li>v4.3<br>
117111 1.Fix subscription view<br>
118112 2.fix leetcode-cn.com login<br>
113+ 3.add a new feature of browsing certain question on the website of leetcode<br>
119114 </li>
120115
121116 <li>v4.2<br>
282277 text =" open question" description =" open question" icon =" AllIcons.Actions.Annotate" >
283278 </action >
284279
285- <action id =" leetcode.OpenInLeetCodeAction " class =" com.shuzijun.leetcode.plugin.actions.OpenInLeetCodeAction "
286- text =" open in leetcode " description =" open in leetcode " icon =" AllIcons.Actions.Annotate " >
280+ <action id =" leetcode.OpenInWebAction " class =" com.shuzijun.leetcode.plugin.actions.OpenInWebAction "
281+ text =" open in web " description =" open in web " icon =" AllIcons.Actions.MoveTo2 " >
287282 </action >
288283
289284 <action id =" leetcode.SubmitAction" class =" com.shuzijun.leetcode.plugin.actions.SubmitAction"
323318
324319 <group id =" leetcode.NavigatorActionsMenu" >
325320 <reference id =" leetcode.OpenAction" />
326- <reference id =" leetcode.OpenInLeetCodeAction " />
321+ <reference id =" leetcode.OpenInWebAction " />
327322 <separator />
328323 <reference id =" leetcode.SubmitAction" />
329324 <reference id =" leetcode.SubmissionsAction" />
Original file line number Diff line number Diff line change 11package com .shuzijun .leetcode .plugin .actions ;
22
3- import com .alibaba .fastjson .JSON ;
43import com .intellij .ide .BrowserUtil ;
54import com .intellij .openapi .actionSystem .AnActionEvent ;
6- import com .intellij .openapi .application .ApplicationManager ;
7- import com .intellij .openapi .project .Project ;
8- import com .shuzijun .leetcode .plugin .manager .CodeManager ;
95import com .shuzijun .leetcode .plugin .model .Config ;
106import com .shuzijun .leetcode .plugin .model .Question ;
117import com .shuzijun .leetcode .plugin .utils .DataKeys ;
12- import com .shuzijun .leetcode .plugin .utils .MessageUtils ;
13- import com .shuzijun .leetcode .plugin .utils .PropertiesUtils ;
148import com .shuzijun .leetcode .plugin .utils .URLUtils ;
159
1610import javax .swing .*;
1711import javax .swing .tree .DefaultMutableTreeNode ;
1812
19- public class OpenInLeetCodeAction extends AbstractAction {
13+ /**
14+ * @author zzdcon
15+ */
16+ public class OpenInWebAction extends AbstractAction {
2017 @ Override public void actionPerformed (AnActionEvent anActionEvent , Config config ) {
2118 JTree tree = anActionEvent .getData (DataKeys .LEETCODE_PROJECTS_TREE );
2219 DefaultMutableTreeNode note = (DefaultMutableTreeNode ) tree .getLastSelectedPathComponent ();
2320 Question question = (Question ) note .getUserObject ();
24- BrowserUtil .browse (URLUtils .getLeetcodeUrl ()+ "/problems/" +question .getTitleSlug ());
21+ BrowserUtil .browse (URLUtils .getLeetcodeProblems () +question .getTitleSlug ());
2522 }
2623}
You can’t perform that action at this time.
0 commit comments