Code Monkey home page Code Monkey logo

shuzijun / leetcode-editor Goto Github PK

View Code? Open in Web Editor NEW
3.6K 34.0 396.0 30.14 MB

Do Leetcode exercises in IDE, support leetcode.com and leetcode-cn.com, to meet the basic needs of doing exercises.Support theoretically: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio

Home Page: https://plugins.jetbrains.com/plugin/12132-leetcode-editor

License: Apache License 2.0

Java 99.16% CSS 0.49% HTML 0.35%
leetcode idea intellij-plugin algorithm

leetcode-editor's Introduction

Leetcode Editor Leetcode Editor

Release Snapshot License Plugin Homepage Version Pro Plugin Homepage Version Downloads English Document 中文文档 捐赠 内推

demo


Introduction

Do Leetcode exercises in IDE, support leetcode.com and leetcode.cn, meet the needs of problem solving and debugging. Support theoretically: IntelliJ IDEA,PhpStorm,WebStorm,PyCharm,RubyMine,AppCode,CLion,GoLand,DataGrip,Rider MPS,Android Studio.

Getting Started

start

Local debugging

loacl

Installation(help)

Configuration (configuration for first installation)

config

  • Configuration path: File -> settings->tools->leetcode plugin
    • URL options: leetcode.comORleetcode.cn
    • Code Type: Java,Python,C++,Python3,C,C#,JavaScript,Ruby,Swift,Go ,Scala,Kotlin,Rust,PHP,Bash,SQL
    • LoginName: Login Username
    • Password: Login password
    • Temp File Path: Temporary file storage catalogue
    • proxy(HTTP Proxy): HTTP Proxy,config path:File -> settings->Appearance & Behavior->System Settings->HTTP Proxy
    • Custom code template: Custom code template (details) (demo)
    • LevelColour: Customize the difficulty color of the question, it will take effect after restart

Window

window

  • Toolbar:
    • loginSign in:The login accounts of the two websites are not interoperable and the corresponding users need to be configured when switching websites.
    • logoutSign out:Exit the current account, if you encounter a login error, try to exit first.
    • refreshRefresh:You can also refresh and load questions if you are not logged in, but you cannot submit it.
    • pickpick:Open a problem randomly.
    • findFind:Open filter panel. You can search, filter and sort.
    • progressSession:Open the Session panel. You can view or switch sessions.
    • toggleToggle List:Switch to other list windows, including "All Problem List" , "Paginated Problem List" , "CodeTop Problem List".
    • configSettings:Quick jump to the configuration page.
    • clearClear:Clean up the files in the configured cache directories. The cache directories of the two websites are different and only the current configured websites are cleaned up. Carefully clean up cases without submitting.

Menu

menu

  • Menu (right-click on the questions):
    • open question:Open the question or double click on the question
    • open content:Show content(Rely on Markdown)
    • Submit:Submit the question
    • Submissions:View the submission record, select the record details in the pop-up window(Show detail)
    • Run Code:Run the code, the test case for the question is used by default
    • Testcase:Customize test cases
    • favorite:Add or remove favorite
    • Clear cache:Clean up the current question
    • Timer:Timer, when it is turned on, it will prompt the problem solving time in the status bar in the lower right corner

  • Editor Menu(Right-click on Editor to appear):
    Function as above

  • Question Editor:
    • Content:Show content(Rely on Markdown)
    • Solution:show solution
    • Submissions:View the submission record
    • Note:Show note

Support and Donations

leetcode-editor's People

Contributors

cocobear avatar etigerstudio avatar flagist0 avatar leileichui avatar momentderek avatar shuzijun avatar xpol avatar zzdcon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leetcode-editor's Issues

使用submissions的Show detail功能报错

操作系统: Ubuntu 18.04.2 LTS
软件:GoLand 2018.3
错误信息:

java.lang.NullPointerException
at com.shuzijun.leetcode.plugin.manager.SubmissionManager.openSubmission(SubmissionManager.java:88)
at com.shuzijun.leetcode.plugin.actions.SubmissionsAction.actionPerformed(SubmissionsAction.java:44)
at com.shuzijun.leetcode.plugin.actions.AbstractAction.actionPerformed(AbstractAction.java:39)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:258)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:275)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:287)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:283)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:106)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:277)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:524)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:35)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:546)
at java.awt.Component.processMouseEvent(Component.java:6548)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6313)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4903)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:664)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

can't save login Password, I think it is a Mac problem

Now, I can't save my Password, so I can login.
when the first time login, system prompt a box to allow something, I tried system password, but failed. so I 'deny' it.
But now I can't find the where to set the info

显示filter完的题目数量

在那个交集符号n的右边可以显示题目的数量吗,比如我filter by tag,选了heap, 列出了32道题,所以在n的右边显示(32)。

如下
Difficulty˘ Status˘ Lists˘ Tags˘ ⧠ 口 n (32)

可以添加代理功能吗

因为内网需要通过代理才能访问外网,在设置了IDEA的代理后仍然无法使用插件(超时),请问可以支持一下代理设置吗?

IDEA里无法进行代码审查

通过插件打开的问题,编辑代码时并没有出现错误提示,比如前面未定义的变量名或者代码未使用;结尾

通过download zip手动安装后,在Pycharm上无法运行

环境:

PyCharm 2019.1.3 (Professional Edition)
Build #PY-191.7479.30, built on May 29, 2019
JRE: 11.0.2+9-b159.60 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.5


  1. 只有idea-leetcode-plugin.jar 可以添加成功

当添加 jsoup-1.11.3.jarfastjson-1.2.47.jar时, 跳出Fail to load plugin descriptor from file jsoup-1.11.3.jar/fastjson-1.2.47.jar

  1. 在LoginName和Password全都正确的情况下,Login 提示info: login failed, examine e-mail or password

  2. Refresh, 出现IDE Fatal Errors

java.lang.NoClassDefFoundError: com/alibaba/fastjson/JSONObject
	at com.shuzijun.leetcode.plugin.manager.QuestionManager.parseQuestion(QuestionManager.java:196)
	at com.shuzijun.leetcode.plugin.manager.QuestionManager.getQuestionService(QuestionManager.java:51)
	at com.shuzijun.leetcode.plugin.manager.ViewManager.loadServiceData(ViewManager.java:34)
	at com.shuzijun.leetcode.plugin.actions.RefreshAction.perform(RefreshAction.java:18)
	at com.shuzijun.leetcode.plugin.actions.AbstractAsynAction$1.run(AbstractAsynAction.java:17)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source

提供个已掌握题目过滤功能

大佬能不能提供个类似百词斩的斩词功能 具体就是某个题目我觉得太简单了 然后可以把这个题目从列表里面剔除掉

关于refresh

我在ide里刷完两题后,用filter找Top 100 并且 To do的题,我刚刚写完的那两题没有自动更新status为solved。等我手动refresh题库后,再用filter Top 100 List 并且 To do,那两道做过的题的status这下自动更新为solved了。每次我submit完,可以让题目的status自动refresh吗?

中文搜索显示有一些问题

我idea版本是2019.1
例如搜索'中序遍历', 显示出的列表要向下滚动几个项,才是真正匹配的题
这是我直接搜索中序遍历,所展示的列
image

向下滚动几个项才能显示正确
image

而且直接搜索题ID 就完全不对了

Import statement cause submit failure

When you typing the code, if there was any import statement been added at the top of the file by Intellij automatically, the submit would failed.
This is on a Windows machine with Intellij CE 2019.2 edition.

一直报NPE

大佬,我idea一直报NPE

提交出错

java.lang.NullPointerException
at com.shuzijun.leetcode.plugin.manager.CodeManager$RunCodeCheckTask.run(CodeManager.java:373)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

拉到本地运行起来后看不到插件

IDEA.log:
[ 30482] WARN - j.ui.mac.MacMainFrameDecorator - no url bundle present.
To use platform protocol handler to open external links specify required protocols in the mac app layout section of the build file
Example: args.urlSchemes = ["your-protocol"] will handle following links: your-protocol://open?file=file&line=line

不认java文件

你好,这个插件非常好,点赞!初次使用遇到一个问题,点开题目后,java文件上有一个橙色的小j,说明idea不认java文件。
image

忽略这个小j,直接编辑,被提示不属于项目,要我确认编辑,然后编辑的时候没有补全功能。这个体验不太好。
image

最新版,拉取代码失败

获取代码失败

java.lang.NullPointerException
at com.shuzijun.leetcode.plugin.utils.CommentUtils.createComment(CommentUtils.java:13)
at com.shuzijun.leetcode.plugin.manager.CodeManager.openCode(CodeManager.java:70)
at com.shuzijun.leetcode.plugin.listener.TreeMouseListener.mouseClicked(TreeMouseListener.java:49)

【enhancement】希望能显示log

如题,在网站上打印的Log在 run code 之后是会显示的
但是在插件中并没有显示 stdout

接口中实际是有返回的 应该工作量不大
image

Crashed on Webstrom 2019.1

When clicked the Sign in button, below error message is showed:

java.lang.NullPointerException
	at com.shuzijun.leetcode.plugin.utils.URLUtils.getLeetcodeHost(URLUtils.java:23)
	at com.shuzijun.leetcode.plugin.utils.URLUtils.getLeetcodeUrl(URLUtils.java:31)
	at com.shuzijun.leetcode.plugin.listener.LoginListener.actionPerformed(LoginListener.java:45)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at com.chrisrm.idea.ui.MTButtonUI$ButtonHighlighter.mouseReleased(MTButtonUI.java:383)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6550)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
	at java.awt.Component.processEvent(Component.java:6315)
	at java.awt.Container.processEvent(Container.java:2239)
	at java.awt.Component.dispatchEventImpl(Component.java:4899)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Component.dispatchEvent(Component.java:4721)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
	at java.awt.Container.dispatchEventImpl(Container.java:2283)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4721)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:739)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:742)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:687)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

info: 登录失败,请检查用户名密码

请求出错:

javax.net.ssl.SSLProtocolException: Unexpected rethrowing
at java.base/sun.security.ssl.Alert.createSSLException(Unknown Source)
at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
at java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.handleException(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(Unknown Source)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:282)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:165)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at com.shuzijun.leetcode.plugin.utils.HttpClientUtils.execute(HttpClientUtils.java:121)
at com.shuzijun.leetcode.plugin.utils.HttpClientUtils.executeGet(HttpClientUtils.java:100)
at com.shuzijun.leetcode.plugin.actions.LogoutAction.perform(LogoutAction.java:20)
at com.shuzijun.leetcode.plugin.actions.AbstractAsynAction$1.run(AbstractAsynAction.java:17)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Socket closed
at java.base/java.net.SocketInputStream.socketRead0(Native Method)
at java.base/java.net.SocketInputStream.socketRead(Unknown Source)
at java.base/java.net.SocketInputStream.read(Unknown Source)
at java.base/java.net.SocketInputStream.read(Unknown Source)
at java.base/sun.security.ssl.SSLSocketInputRecord.read(Unknown Source)
at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(Unknown Source)
... 27 more

搜索后可以生成一个新列表吗?

比如我搜anagram, 第49, 242, 438题等等可以显示在一个新列表里吗?
现在是我要一直按enter一题一题的看到,如果有个下拉列表出现在探索栏下面就最好啦
数字君,求新feature 哈哈

需要两个快捷键Run code, Submit

现在是我要右键题目然后选择Run Code or Submit,大佬可不可以加两个快捷键,比如Ctrl + Command + R, Ctrl + Command + S,谢谢啦。

编译错误信息显示不完整

如果提交代码/run code的时候有编译错误的话, 错误信息显示的不完整, 例如
info: Compile Error:bnull

显示错误的行数也不正确,好像是没有算上开始的注释部分,导致显示错误的行数与真正文件内的行数不一致。

remote host close when submit on Mac

请求出错: Remote host closed connection during handshake
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:992)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at com.shuzijun.leetcode.plugin.utils.HttpClientUtils.execute(HttpClientUtils.java:102)
at com.shuzijun.leetcode.plugin.utils.HttpClientUtils.executeGet(HttpClientUtils.java:80)
at com.shuzijun.leetcode.plugin.utils.HttpClientUtils.isLogin(HttpClientUtils.java:128)
at com.shuzijun.leetcode.plugin.manager.CodeManager.getCodeText(CodeManager.java:194)
at com.shuzijun.leetcode.plugin.manager.CodeManager.SubmitCode(CodeManager.java:107)
at com.shuzijun.leetcode.plugin.actions.SubmitAction.perform(SubmitAction.java:22)
at com.shuzijun.leetcode.plugin.actions.AbstractAsynAction$1.run(AbstractAsynAction.java:17)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
... 27 more

non blocking requests

When you click logging in, running the code etc. The entire UI of IntelliJ gets blocked. (not a huge problem as in the end u are waiting for the result.)

This seems to be solved simply by adding the code within executeOnPooled thread:

For example we can include the whole code in LoginAction.actionPerformed as shown below:

        ApplicationManager.getApplication().executeOnPooledThread(() -> {
            //code to login
        });

Tested it and it works. Though have very limited IntelliJ plugin development knowledge wanted to check if this is a viable solution, and if we want this implemented?

常见问题

V7.x更新后问题

Q:提示错误Could not initialize class com.shuzijun.leetcode.plugin.editor.LCVPanel
Q:提示Your environment does not support JCEF.
A:这两个问题都是JCEF未启用导致,在2020.2+之后是默认启用JCEF的,可能由于以前的配置禁用了,可以通过以下操作开启:Help -> Find Action..,在输入框中输入ide.browser.jcef.enabled
A:android studio用户可以参考shuzijun/markdown-editor#4 (comment) 开启

Q:题目描述或者查看题目解答乱码
A:在Help->Edit Custom VM options中增加或者修改-Dfile.encoding=utf-8

Q:提示未填写密码或原配置密码丢失了
A:更换了新的存储密码API,需要重新配置保存下


Q:提示登录失败
A:建议检查一下登录账号和密码,是否和所选择的网站对应,两个网站的账号是不互通的。

Q:提示无法判断登录状态
A:这个异常发生在部分账号上,目前没有找到产生的原因,建议先检查用户名密码是否填写,再通过网页版登录一下,确定登录账号正常,然后再在插件里登录

Q:获取**异常
A:这类问题主要出现在网络问题,可以通过ide右下角的提示信息查看具体错误,例如:"java.net.SocketTimeoutException: Read timed out",如果遇到不能识别的错误,可以通过错误提示框下方的按钮"提报给作者"进行反馈

Q:提示错误java.net.SocketTimeoutException: Read timed out
A:此类问题多数出现在网络差的情况下,建议先通过网页访问网站,测试网络是否有问题。

Q: Icon cannot be found in 'AllIcons.General.OpenDiskHover'
A:出现在一些低版本上,没有这个图标,下个版本更换此图标

Q:javax.net.ssl.SSLException: Unexpected rethrowing
A:此类问题一直没有复现,也没有找到具体产生的原因,有了解的可以交流一下

Q:Element [email protected].@name=password probably contains sensitive information
A:此问题是由于低版本序列化时没有排除掉密码,在新版中已经修复。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.