intellij-idea

sbt run/debug configuration broken showing unknown after upgrading intellij to 2020.1

情到浓时终转凉″ 提交于 2021-01-29 05:10:25
问题 I just upgraded IntelliJ community edition to latest version 2020.1 as of today. All my SBT run/debug configurations are broken and currently show Unknown under Edit configuration. I have checked the workspace.xml and configuration seems correct. I have also checked I've got the latest SBT plugin. Any help or pointers will be much appreciated as I have dozens of projects with lots of configurations so will be annoying to have to create them again. 回答1: After a couple of hours finally figure

Display typescript error in html in Intellij/Webstorm

戏子无情 提交于 2021-01-29 05:08:33
问题 Is it possible to setup Intellij to display TypeScript errors in Angular template? I have the following dummy app shared on stackblitz. If I create a @Input with optional object parameters and use it in the template, I've got an error in console, but Intellij is ok with that. No error whatsoever. Note, I have strict mode on: tsconfig.json "angularCompilerOptions": { "strictInjectionParameters": true, "strictInputAccessModifiers": true, "strictTemplates": true } data.ts export interface Data {

Java: Making an Optional Command Line Argument

做~自己de王妃 提交于 2021-01-29 04:34:19
问题 I am working on a program that is supposed to take one required command line argument and one optional command line argument. The first argument is the name of an output file where data will be written to, and the second is a number that will be used to calculate the data to be written to the output file. If the user does not enter a number, then it should just use a default value to calculate the data. For example, if the user entered command line arguments "Foo.csv 1024" the program would

Generate .JAR from IntelliJ

守給你的承諾、 提交于 2021-01-29 04:31:35
问题 I am attempting to create a JAR from IntelliJ using the build artifacts but when I do it is saying Error: Invalid or corrupt jarfile Im not sure what im doing wrong though? 回答1: Hard to tell from what you have posted. Intellij can be finicky at times especially with the Artifact jar build interface. There is a good tutorial on IntelliJ's website on how to set up the artifact. One area that may provide difficulty is pointing to the Main Class. An issue I had in building a jar using the tool

Gradle fails trying to build class using PsiMethod in IntelliJ Plugin project

半腔热情 提交于 2021-01-29 03:22:08
问题 I have a Intellij plugin project that I can successfully build without using the PsiMethod class. I've generated this project using this intellij plugin guide As soon as I add in code using PsiMethod class (from the Intellij SDK code_samples directory) The intellisense cannot find any GOTO information for the class. I can then switch my project settings module from JAVA_1.8.0 to by adding it into the platform settings SDKs: This now adds intellisense, and gives me the ability to navigate to

maven: java.io.FileNotFoundException when trying to open file from resources with Intellij or using java command with jar

情到浓时终转凉″ 提交于 2021-01-29 03:09:01
问题 I've imported the github's project from the book "Java 8 In Action" in intellij as a maven project. The module structure is the following: Then, i'm executing the Main method from the ExecuteAround class directly from Intellij (right click -> execute main...) public static void main(String ...args) throws IOException{ // method we want to refactor to make more flexible String result = processFileLimited(); System.out.println(result); System.out.println("---"); String oneLine = processFile(

why do I have to remove a dependency from my pom before adding it back and installing to get the latest version of my maven package?

旧巷老猫 提交于 2021-01-29 00:51:16
问题 I have a maven package I've hosted on GitHub package registry. Whenever I make an update to the package I run mvn deploy to publish the changes, but if I simply run mvn install on the dependent application it doesn't seem to install the latest version of the package. Only after deleting the pom.xml and then loading the changes into IntelliJ, then adding it back and running mvn install does it seem to get the new publication of the package. This is my settings.xml file: <settings xmlns="http:/

why do I have to remove a dependency from my pom before adding it back and installing to get the latest version of my maven package?

。_饼干妹妹 提交于 2021-01-29 00:38:29
问题 I have a maven package I've hosted on GitHub package registry. Whenever I make an update to the package I run mvn deploy to publish the changes, but if I simply run mvn install on the dependent application it doesn't seem to install the latest version of the package. Only after deleting the pom.xml and then loading the changes into IntelliJ, then adding it back and running mvn install does it seem to get the new publication of the package. This is my settings.xml file: <settings xmlns="http:/

Java intellij clipboard backup

霸气de小男生 提交于 2021-01-28 20:34:11
问题 I am writing a program operating on clipboard, and I want to make backup of clipboard contents at startup, and restore it when finished. So it looks like: data = Toolkit.getDefaultToolkit.getSystemClipboard.getContents(this); doSomething(); Toolkit.getDefaultToolkit.getSystemClipboard.setContents(data, this); it works fine in general, but when I copy a part of code from Intellij, and run my program, it throws: Exception "java.lang.ClassNotFoundException: com/intellij/codeInsight/editorActions

IntelliJ IDEA (2020.2): Gradle: The cache entry for initialization script (appears to be corrupted)

淺唱寂寞╮ 提交于 2021-01-28 18:54:39
问题 I am working with Intellij Idea (CE) 2020.2.3 And using Gradle 6.7 I have the following behavior in Mac and Windows In the IDE after to had imported the spring-framework project based on Gradle and the latter being configured as follows: From above: gradle user home and gradle home are customs locations Note: the .gradle directory located in the user home is empty . Always when I startup the IDE happens the following process: The project is loaded: Immediately and automatically the project is