intellij-idea

Gradle - one project, multiple packages, multiple jars

邮差的信 提交于 2021-01-27 10:29:18
问题 I'm asking you about a very basic question but I hope you can find the time to help me: I'm trying to realise a java-project, that can spit out several different programs which partially have dependencies on other projects of mine. In order to keep it simple, I want to have all the code in one project, run by Gradle, so if I make changes to a central library (the database connector for example) all the child-programs automatically recieve the changes. An example could look like this: project:

Gradle - one project, multiple packages, multiple jars

╄→гoц情女王★ 提交于 2021-01-27 10:26:49
问题 I'm asking you about a very basic question but I hope you can find the time to help me: I'm trying to realise a java-project, that can spit out several different programs which partially have dependencies on other projects of mine. In order to keep it simple, I want to have all the code in one project, run by Gradle, so if I make changes to a central library (the database connector for example) all the child-programs automatically recieve the changes. An example could look like this: project:

How to wrap text in quick documentation in IntelliJ?

本秂侑毒 提交于 2021-01-27 07:33:27
问题 After Ctrl+Q (Quick documentation) I could not see all text. I have to scroll horizontally to see all content. I could not make the editor to fit the window. UPDATE: The problem is only symbol definition, ie. the first line. The description (block text) is wrapped correctly. Actually, I don't want to resize this window as I prefer to keep it as I write in the same position for quick reference. I have to add that my monitor is quite small (15-inch) which is probably causing the problem. 回答1:

How to wrap text in quick documentation in IntelliJ?

倾然丶 夕夏残阳落幕 提交于 2021-01-27 07:31:23
问题 After Ctrl+Q (Quick documentation) I could not see all text. I have to scroll horizontally to see all content. I could not make the editor to fit the window. UPDATE: The problem is only symbol definition, ie. the first line. The description (block text) is wrapped correctly. Actually, I don't want to resize this window as I prefer to keep it as I write in the same position for quick reference. I have to add that my monitor is quite small (15-inch) which is probably causing the problem. 回答1:

Automatically download sources in Gradle project

我只是一个虾纸丫 提交于 2021-01-27 05:50:31
问题 In Maven projects, there is an option to automatically download sources (and javadoc) for all libraries. For Gradle project I found no option, just to open a class and click "Search in internet". This is very annoying if you have a lot of libraries. Is there any way to automatically attach sources from the internet (maven repo)? 回答1: I know that this is an old topic, but in case someone reaches here and does not want to gradle idea, you can also use a plugin and then it will resolve sources

Make IntelliJ aware of a properties file

孤街浪徒 提交于 2021-01-27 05:18:27
问题 Is there some way to tell IntelliJ that a particular .properties file will be loaded into a project's environment? We use @PropertySource annotations to load properties files, and in several places load override values from a file determined by an already-configured property, like so: @Configuration @PropertySource("classpath:com/example/package/db.properties") @PropertySource("classpath:com/example/package/db.${db.instance}.properties") public class DatabaseConfig { private @Value("${db

Make IntelliJ aware of a properties file

て烟熏妆下的殇ゞ 提交于 2021-01-27 05:17:53
问题 Is there some way to tell IntelliJ that a particular .properties file will be loaded into a project's environment? We use @PropertySource annotations to load properties files, and in several places load override values from a file determined by an already-configured property, like so: @Configuration @PropertySource("classpath:com/example/package/db.properties") @PropertySource("classpath:com/example/package/db.${db.instance}.properties") public class DatabaseConfig { private @Value("${db

Cannot run Main class in Intellij [duplicate]

混江龙づ霸主 提交于 2021-01-27 04:29:10
问题 This question already has answers here : Error “ClassNotFoundException” in IntelliJ IDEA (12 answers) Closed 4 years ago . I have the following project structure -ProjectRoot ---src ------Main ------examples ---libs My src folder is marked as sources in Intellij. Now, when I want to run Main class, I get the following error: Exception in thread "main" java.lang.ClassNotFoundException: Main Any ideas on what am I doing wrong? Here is my main class: public class Main { public static void main

Cannot run Main class in Intellij [duplicate]

烈酒焚心 提交于 2021-01-27 04:28:09
问题 This question already has answers here : Error “ClassNotFoundException” in IntelliJ IDEA (12 answers) Closed 4 years ago . I have the following project structure -ProjectRoot ---src ------Main ------examples ---libs My src folder is marked as sources in Intellij. Now, when I want to run Main class, I get the following error: Exception in thread "main" java.lang.ClassNotFoundException: Main Any ideas on what am I doing wrong? Here is my main class: public class Main { public static void main

How do I stop PyCharm from autocompleting class methods?

余生长醉 提交于 2021-01-27 02:47:01
问题 When I type: def method( , PyCharm jumps in with def method(self): . I would like to disable this behaviour. 回答1: The option is located at: Settings > Editor > Smart Keys > Insert Self... EDIT: As of pycharm 2017.1 it's under File -> Settings -> Editor -> General -> Smart Keys 回答2: In PyCharm 2017.1 File -> Settings -> Editor -> General -> Smart Keys -> "Insert 'self' when defining a method" 回答3: Go to File > Settings (or Ctrl + Alt + S ) > [IDE Settings] > Editor > Code Completion . The