Questions tagged [intellij-idea]

14447 questions
1

votes
1

answer
41

Views

In Dart / IntelliJ Idea how to make it an error when you miss a return?

In Dart / IntelliJ Idea how to make it an error (not a simple warning) when you miss a return? If I forget to add a return, it's a simple warning, it's very easy to miss, and this makes me waste a lot of time. warning: This function declares a return type of 'RichText', but doesn't end with a return...
MarcG
1

votes
1

answer
397

Views

How to set proxy through setting.json in JetBrains Toolbox?

When I click change proxy setting button on this app, it will crash. And I realize that I can set proxy through settings.json. But in this file it shows like below. { 'autostart': true, 'install_location': 'D:/Jetbrains/ToolBox', 'privacy_policy': { 'eua_accepted_version': '1.1' }, 'proxy': null 'sh...
vainman
1

votes
1

answer
59

Views

IntelliJ in “blocked” mode when window comes into focus

I use i3 as a window manager. When I switch focus to Intellij (actually WebStorm but it's the same engine underneath), the cursor doesn't appear. I have found that hitting ctrl+f->esc is a workaround to get the cursor back (going into the IDE search and exiting again). Alternatively, I can click on...
pascalwhoop
1

votes
2

answer
24

Views

How to remove Startup/Configuration tab from Intellij Plugin extending RunConfigurationBase

I am creating a custom IntelliJ plugin (following the IntelliJ tutorial) that implements a custom Run Configuration. My plugin will 'run' the contents the open file in the editor on a remote server and display the result in IntelliJ (sort of a script playground). I used the IntelliJ GUI Designer to...
empire29
1

votes
0

answer
7

Views

Is there a way to get the classpath from a Intellij project in order to execute the project from the command line (terminal)?

I have created a large Maven project in Intellij IDEA that uses many libraries and Maven dependencies, I now have to be able to run it from the command line (using Terminal in MacOS Mojave). Is there a way to get the classpath that Intellij uses when it runs this project? Or any other way to avoid m...
1

votes
1

answer
51

Views

assert in foreach causes too few argument lists for macro invocation

I'm using scala test to check if Array contains Arrays of given size: result.map(_.length == 2).foreach(assert) This causes compilation error: Error:(34, 39) too few argument lists for macro invocation result.map(_.length == 2).foreach(assert) although intellij does not indicate compilation error. H...
Andronicus
1

votes
1

answer
35

Views

IntelliJ hint while rounding BigDecimal division stream result

I have a little bit strange problem with IntelliJ hint while dividing result at the end of stream operation. products.stream() .filter( order -> order.getEstimatedRealizationDate().compareTo(begin) > 0 && order.getEstimatedRealizationDate().compareTo(end) < 0) .map(order -> order.getProduct().getP...
Martin
1

votes
1

answer
75

Views

Most used Strings in IntelliJ

Is there a way to detect, if any hard-coded string is repeated more than x times in the whole project? Let's say I have a project with multiple folders and classes and I have a separate class called Constants, where I store all my project constants. Since the project is getting bigger, it will be ni...
Andrei Suvorkov
1

votes
1

answer
45

Views

What are the files and folders created automatically when creating new project in IntelliJ IDEA

I am currently learning java programming and just switched to JetBrains IntelliJ IDEA as I already use JetBrains PyCharm for Python programming and really like it. Up to now I was using a simple text editor to write my java programs, but in IntelliJ they create a bunch of files and folders automatic...
johnwolf1987
1

votes
2

answer
50

Views

Finding duplicate constants in Java project

My project is not small, and consists of a lot of constants in various classes. Some of constants, like 'UTF-8' are duplicated many times, so, i want to create separate class for constants only. Is there a way to analyze a whole project on a subject of duplicated constants, so i don't need to do it...
coolsv
1

votes
0

answer
6

Views

Can IntelliJ be configured to hit a breakpoint in a Java class that is loaded at runtime through reflection?

I have a Java class that is being loaded at runtime through reflection for a Kafka Streams application, configured with passing the name of the class as a String, like this: streamsConfig.put(StreamsConfig.DEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIG, 'com.company.data.kstreams.Processor.MediaTimestampE...
mjuarez
0

votes
0

answer
11

Views

IntelliJ - Gradle - Kotlin - Micronaut - Changing files does not re-generate classes on “run”

I have a Kotlin-Micronaut v.1.0.2 project in IntelliJ and with Gradle v5.3. My running application has for example the following controller: @Controller('/api/test') class TestController { @Get fun helloWorld() = 'Hello World' } In case I change any of this code, for example change the return value...
Florian Hansen
1

votes
3

answer
904

Views

intellij Mac set a SDK home path to /usr

Using Intellij IDEA 14.1.2 I am trying to set an Erlang SDK home path, the only option I have for doing this is a file browser that does not let me view my /usr/local file. That is, I have no option for typing the desired path. I am forced to use the Apple gui file browser (that does not show /bin o...
beoliver
1

votes
1

answer
880

Views

How to dereference old Wildfly 9.0.1 deployment artifacts of Spring MVC app built with intelliJ-IDE?

I'm using intelliJ-IDE-14 to create a SpringMVC project named app which was initially being deployed to JBoss Wildfly 9.0.1.Final as app.war Here's the step by step scenario leading up to my issue; After finishing project config to utilize Maven | Spring | Hibernate | Wildfly | Velocity, then I made...
CodeBurner
1

votes
2

answer
4.4k

Views

Cannot add Spring dependencies with Gradle

I am new to Spring, and I am trying to create a simple Spring Boot 'hello world' application, so I created a build.gradle file to add Spring Boot dependency: apply plugin: 'java' repositories { jcenter() } dependencies { compile('org.springframework.boot:spring-boot-starter-web:1.3.3.RELEASE') } The...
user2340612
1

votes
1

answer
117

Views

Intellij IDEA imports wrong RxJS classes

I use Intellij IDEA to develop my angular project. When use classes from various libraries, IDEA adds import statements for me. But, when adding RxJS classes, IDEA adds some imports incorrectly. For an example IDEA adds: import {first} from 'rxjs/internal/operators'; instead of import {first} from '...
Lahiru Chandima
1

votes
1

answer
630

Views

Should I tell Intellij that my WSL filesystem is case sensitive?

I share my Windows 10 filesystem with the Windows Subsystem for Linux. I keep my coding projects in the dev folder in my user directory, and share that to /mnt/c/Users/Conan/dev in WSL. Intellij runs projects from the Windows filesystem, but I use a range of command-line tools to run things (such...
Conan
1

votes
3

answer
268

Views

“Access can be private” warning message for public setter/mutator methods in IntelliJ IDEA

I have a public class with private fields and public setter methods to set those fields. Why IntelliJ IDEA is warning me saying 'Access can be private' for these setter methods?
Saikat
1

votes
2

answer
69

Views

In IDEA, how to scroll quickly in a file?

In Eclipse, could scroll up/down across a large file quickly, via ctrl + wheel up / wheel down. This is convenient sometimes, so is it possible to do this in IDEA? BTW: Dragging the scrollbars is not desired (it's slow, and not as precise). I am not trying to see the file structure, that's another s...
Eric Wang
1

votes
2

answer
32

Views

Intellij highlight file in Project Explorer

In Eclipse, one can choose a File in Editor, right click and hight-light the file in Project Explorer. That will expand the tree, and one can see the file highlighted. I'm wondering how one can accomplish the same in Intellij IDEA.
Vineel
1

votes
1

answer
25

Views

Using pow in KotlinJS in Intellij

There is a library called kotlin.math which contains a method pow: import kotlin.math.pow val factor = pow(10.0, 2) print(factor) and result: 100.0 However Intellij is not registering that I have imported the pow function, is there a special pow method for KotlinJS?
Robbie Cronin
1

votes
0

answer
388

Views

JADE (Java Agent Development Framework): cannot find agent on Intellij

I'm new to JADE. I'm trying to run an Agent on intellij, i already added the jade.jar file to the modules and checked the export option on the module and created a run configuration with the following characteristics: Main Class: jade.Boot Program Arguments: -gui -agents agent1:newPackage.NewAgent R...
Stefan Postolache
1

votes
1

answer
35

Views

How to set up Idea under MacOs

I downloaded Idea EAP 2017.3 Ultimate for Mac OS, with a bundled jre. Once I cloned my gradle project, I tried to sync but it was complaining that there was no project SDK. I tried to add the bundled jre under /Applications/IntelliJ IDEA.app/Contents/jdk/Contents/Home but it always complained it was...
elect
1

votes
0

answer
31

Views

WebStorm - Scope - Hide top-level directory

I've set up a scope to basically show the contents of the src directory in my project: file:src//* This works as intended, but it should the src directory itself, like this: src index.js another.js Is there a way to get it to remove the extra directory, so it'd show something like this: index.js ano...
samanime
1

votes
1

answer
260

Views

Maven will not find junit tests to execute, says it ran 0 tests and the build succeeded

Firstly, why does maven come with a test goal, but also I see people running mvn surefire:test as if it does something else. What is the difference between the two? Secondly, I cannot seem to get maven to run my unit tests. No matter what I try, I always get Results : Tests run: 0, Failures: 0, Erro...
Pablo Canseco
1

votes
2

answer
76

Views

git in IntelliJ IDEA without sacrificing netbeans history feature

Below is the image that shows the feature in Netbeans , where the file changes can be compared by doing the right click and changes can be undone. [ It is the feature that help a lot. I want to Switch to IntelliJ, but i could not find a similar feature in it, if it is available how to get to this f...
Neil
1

votes
1

answer
289

Views

Calling IntelliJ Swing Forms from another class

I'm just starting out with Java and I've run into this concept that I don't understand. I want to know how I can open a form developed with IntelliJ's Swing Form editor from another class. See below this code works fine in one class. import javax.swing.*; import java.awt.event.ActionEvent; import ja...
Ben Yazolli
1

votes
1

answer
183

Views

Intellij complains of incorrect configuration for django project

Whenever I run my python django application in Intellij, it shows me a dialog box saying configuration is incorrect and gives me an option to edit or run anyway. Following is the screenshot of my configuration. Not sure what is it that I am missing. Update: It does show intermittently in the same co...
comiventor
1

votes
0

answer
27

Views

Freeing memory in IntelliJ results in warnings

In order to make my code more readable, I decided to create a String, and then to use it inside an 'algorithm' (similar to the following): JsonArray users = import(); String currentUser = db.getName(currentID); for (int i=0; i < users.size(); i++) { user = (JsonObject) users.get(i); if (user.get('us...
GalAbra
1

votes
1

answer
505

Views

How to debug the Nashorn JavaScript use the IntelliJ IDEA debugger ?

I have clone this project. https://github.com/winterbe/java8-tutorial/ And I want to debug the project's Nashorn JavaScript file use the IntelliJ IDEA debugger. I run the Nashorn9.java in debug model, and I want to add a breakpoint at nashorn9.js. But it is not working. When I run the debug model, t...
FishGel
1

votes
1

answer
296

Views

Run Gradle tasks from Intellij

I normally run Gradle tasks (xx.sh files) in cygwin and am wondering if I can run them from my IDE, Intellij. I have installed the BashSupport plugin, but have no idea how to create a bash launch configuration. A kind, step-by-step instruction would be appreciated since I am super new. Also, can som...
momo
1

votes
0

answer
363

Views

IntelliJ is not recognizing some of the classes/methods… while the application is working just fine

I'm new to Java/Linux/Maven/IntelliJ, ... When I look at the script serving to build the the code, I see something like this: mvn clean install -Dmaven.test.skip=true Long story short, the code is compiling just fine. I can open the browser and use the application normally. However, when I open the...
Richard77
1

votes
0

answer
145

Views

Environment variables not found in IntelliJ using zsh

I switched to zsh from bash. I updated the shell in Preferences > Terminal settings inside RubyMine. But, now environment variables are not being loaded inside my Rails application. I can still access them inside the terminal in RubyMine editor! I tried printing the value of environment variable ins...
Atul Vaibhav
1

votes
0

answer
41

Views

Intellij different behavior depends on deployed war exploded or not

I see strange behavior in Intellij and JBoss server. Short info about application: - spring 4.3.1 - jersey 1.18.1 - jboss EAP 6.4.0 I have an issue with marshaling, so I tried to dig deeper and try hints from: https://docs.jboss.org/resteasy/docs/1.0.0.GA/userguide/html/Content_Marshalling_Provide...
L.o.o.k.
1

votes
0

answer
42

Views

Log file is not generated after running JAR

I have logback.xml file saved in src/main/resources of my Maven project. The path where the log file should be saved is defined as follows: file>/my/path/myLog.log. I package the JAR file using IntelliJ IDEA. When I run this JAR file, myLog.log does not appear in /my/path/. The problem is that every...
Markus
1

votes
1

answer
29

Views

Intellij Pycharm: Display Plugins by Installation Time

In Intellij Pycharm: how can I sort the installed plugins by installation time? Background: since the installation of some plugins, the CPU consumption of Pycharm is significantly higher. Before I begin to dig into the analysis of the threaddump feature of the CPU plugin, I simply want to uninstall...
1

votes
0

answer
24

Views

Intellij IDEA cannot find Python tests

I'm using Intellij IDEA Python plugin for Python development. I'm writing tests using Unittests module. I've read, we can toggle between test and method being tested using CmdShiftT. However, Intellij cannot find any tests and prompts to create a new test. How can I link the source method with the t...
Anuj Gautam
1

votes
1

answer
341

Views

SonarLint “Connection refused” to SonarQube 6.7

Since upgrading SonarQube from 6.6 to 6.7 I'm facing the Problem, that I can't connect SonarLint for IntelliJ with the SonarQube Server. I need to configure a corporate proxy but the configuration worked with SonarQube 6.6 and hitting 'Test Connection' also returns an OK. The Error Message when conf...
Christoph Forster
1

votes
2

answer
191

Views

How to enlarge Logcat search text field in Android Studio? [duplicate]

This question already has an answer here: Android Studio 3.0 - Logcat window can not show filter input control 5 answers The text field for search in Android Studio on my laptop (15-inch diagonal) is too small. I barely able to type anything on it. I move Android Studio to a larger monitor and I'm...
aldok
1

votes
0

answer
123

Views

How to run javascript tests in intellij using selenium webdriver

I have tests in .js which runs remotely using selenium webdriver. But, it gets hard to debug issues locally. I am using IntelliJ IDE and would like to integrate with selenium webdriver and run them using IDE. Jest is the framework which we use. Can someone please help me figure this out? Thanks!
Nidhi

View additional questions