intellij-idea

How to delete all unused imports from current project in Intellij Idea

泪湿孤枕 提交于 2020-12-28 13:25:14
问题 I have been using Intellij Idea for quite some time now. I have a few questions though. Is there a way to delete all unused imports from all files in the current project ? I know that I can choose menu item Code > Optimize Imports ( CTRL + ALT + O ) to organize imports in individual files but since the application that I am working on has hundreds of files, this process does not make any sense. If there is no way of doing this, can I create a macro for this? If so, how do I do it? 回答1: Click

Attaching Gradle sources in IntelliJ IDEA

試著忘記壹切 提交于 2020-12-27 08:53:06
问题 Once after I create a Gradle project in IntelliJ using the default gradle wrapper and create directories option I see the project structure gets created with build.gradle file. IntelliJ tips me to "You can configure Gradle wrapper to use distribution with sources. It will provide IDE with Gradle API/DSL documentation" - but I am not able to attach the sources even after clicking "Ok, apply suggestion". The Gradle project is getting refreshed but the sources are not attached. We are using a

How can I analyze a heap dump in IntelliJ? (memory leak)

扶醉桌前 提交于 2020-12-27 08:00:06
问题 I have generated a heap dump from my java application which has been running for some days with the jmap tool -> this results in a large binary heap dump file. How can I perform memory analysis of this heap dump within IntellIJ IDEA? I know that there are tools for Eclipse and Netbeans but I would rather use IDEA if possible. The basic results of the analysis would tell me the number of instances of each object in memory, per-class, to allow me to be able to start debugging memory leaks. 回答1:

How to debug spring-boot application with IntelliJ IDEA community Edition?

☆樱花仙子☆ 提交于 2020-12-27 07:33:33
问题 I'm having difficulties in debugging a Java spring-boot application on IntelliJ IDEA community Edition. The main problem is, that the IDE won't stop on a breakpoint, even the program surely executes through it. How can I make the the IntelliJ IDEA to stop on the breakpoint? As additional information, here is my run configurations: Maven configuration with a command as: spring-boot:run. Before launch I build the project. 回答1: tldr: You can try tweaking the command line like this: spring-boot

Spring MVC using tomcat, maven and intelliJ Error

独自空忆成欢 提交于 2020-12-27 07:17:13
问题 I know this question is asked several times, but none of the solutions could help me out. Here's link to project project file. Hoping anyone could help me out JDK-11 Error is class cast exception cannot figure out where specifically error lies and why? even referenced several sites still the error persist stack trace is attached for more details uploaded project to above mentioned link Tomcat LocalHost log 17-Sep-2020 00:14:07.543 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina

Spring MVC using tomcat, maven and intelliJ Error

守給你的承諾、 提交于 2020-12-27 07:17:10
问题 I know this question is asked several times, but none of the solutions could help me out. Here's link to project project file. Hoping anyone could help me out JDK-11 Error is class cast exception cannot figure out where specifically error lies and why? even referenced several sites still the error persist stack trace is attached for more details uploaded project to above mentioned link Tomcat LocalHost log 17-Sep-2020 00:14:07.543 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina

Spring MVC using tomcat, maven and intelliJ Error

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-27 07:16:28
问题 I know this question is asked several times, but none of the solutions could help me out. Here's link to project project file. Hoping anyone could help me out JDK-11 Error is class cast exception cannot figure out where specifically error lies and why? even referenced several sites still the error persist stack trace is attached for more details uploaded project to above mentioned link Tomcat LocalHost log 17-Sep-2020 00:14:07.543 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina

Remove an apostrophe at the beginning or at the end of a word with regex

假装没事ソ 提交于 2020-12-26 23:26:10
问题 I have a list of String that contains word. Some words have apostrophe at the beginning or/and at the end like this: apple 'orange banana' joe's I want to delete only the apostrophes at the beginning and at the end of the words like this: apple orange banana joe's I have tried with the following regex but it doesn't work: myString.replaceAll("((?<=^)'|'(?=$))", ""); It does not work in IntelliJ: But it works with regex101.com: Why the regex dosen't works and how can I remove the beginning and

Remove an apostrophe at the beginning or at the end of a word with regex

自作多情 提交于 2020-12-26 23:21:44
问题 I have a list of String that contains word. Some words have apostrophe at the beginning or/and at the end like this: apple 'orange banana' joe's I want to delete only the apostrophes at the beginning and at the end of the words like this: apple orange banana joe's I have tried with the following regex but it doesn't work: myString.replaceAll("((?<=^)'|'(?=$))", ""); It does not work in IntelliJ: But it works with regex101.com: Why the regex dosen't works and how can I remove the beginning and

Remove an apostrophe at the beginning or at the end of a word with regex

狂风中的少年 提交于 2020-12-26 23:17:39
问题 I have a list of String that contains word. Some words have apostrophe at the beginning or/and at the end like this: apple 'orange banana' joe's I want to delete only the apostrophes at the beginning and at the end of the words like this: apple orange banana joe's I have tried with the following regex but it doesn't work: myString.replaceAll("((?<=^)'|'(?=$))", ""); It does not work in IntelliJ: But it works with regex101.com: Why the regex dosen't works and how can I remove the beginning and