Problem
I am running a project using a tomcat configuration in IntelliJ.
The Evaluate Expression and Evaluate Code Fragment dialog is stuck in that I cannot type within the box. The break points work normally though.
This is the first time I am seeing this behavior.
Update
I noticed the focus is stuck on the project pane and sometimes a search for: box appears.
Related
I have started implementing code minings in our plugin. As we try to support older versions of eclipse as well, the initial development platform was 4.19. As this release only provides LineHeaderCodeMining and LineContentCodeMining, I have created my own LineEndCodeMining that places the mining at the end of a given line. It is done by calculating the offset of the last character in the line and placing a LineContentCodeMining there. The feature based on this is quite similar to Gitlens; I display git commit info at the end of the current editor line.
Our text editor code overrides handleCursorPositionChanged() and that method is responsible for adding/removing these line end minings if the cursor moves to another line. At the end of the handler
((ISourceViewerExtension5)getSourceViewer()).updateCodeMinings();
is called to update the minings.
This works well in eclipse 4.19, however updating the minings works weird on recent eclipse versions: many times these line end minings are displayed only if I move the cursor again (even if I move the cursor horizontally, and this case the code mining related code paths like updateCodeMinings() are not called at all).
Just for testing, I have modified my code to place the minings at the character before the last one and that works perfectly. It seems the problem only occurs with content minings placed at the last character of a line.
I have the feeling it is somehow related to introducing LineEndCodeMining in Eclipse 4.23, but it is just a guess.
I would be happy for any pointers.
Extra question: as a workaround I was thinking of using LineEndCodeMining if it is available (eclipse >= 4.23) and use my own code for older versions. I am wondering what is the correct way to check for the availability of LineEndCodeMining; I cannot find any eclipse style IxxxxxExtension interface for this; should I check the Eclipse version itself?
I'm switching from Sublime Text 3 to IntelliJ, I had a test.java file on my desktop that I used for small testing but now I am not able run the same in IntelliJ, the problem is it's not showing the file when I select run.
I tried experimenting with different projects created through IntelliJ and understand that I need to set Project to run the code, but again I don't see the file I want.
Here is the project selection screen
Here is what happens when I hit run
See this answer and this document.
You need to configure the content and source roots inside the Java module.
If you right click on test.java and click "Run 'test'", that will attempt to run your main class. Although you may have a NullPointer exception in your code. When you attempt to access a.get(0), the value will return null as there are no Integers in your ArrayList. Also generally class files are named with uppercase first characters. Hope this helps!
How to run a highlighted code only in IntelliJ IDEA? Sometimes you don't need to run the whole file and wants to just run the some numbers of code. Are there any such choices in IntelliJ IDEA?
It's possible to evaluate arbitrary expressions (Run | Evaluate Expression):
To evaluate a code fragment, click the Code Fragment Mode button and fill in the Code Fragment text box.
You can also use the Scratches feature.
Since version 15 Java scratches are runnable.
I am just evaluating IntelliJ IDEA. Installed it with default procedures.
I created a simple Spring project and when I right click on the project, not able to see the the bottom part of the pop up menu. The issue is because of my laptop screen's height is less and could not fit the entire set of pop-up menu items.
In eclipse there is a drop down arrow, so that I can scroll to the menu items, which do not fit in the screen. How can I get the similar eclipse functionality in IntelliJ?
Well, you are only missing one useful feature (Genereate Java code from wsdl). I would ignore it unless you need to generate such code.
If you want to run this generation you can do this with Ctrl + Shift + A (and start typing feature name)
//btw, it is better to make code generation in maven anyway
I am unable to find any error in Intellij even after making mistakes
For example: If i write following statement
String str1 =new String("Shoaib")
It should show red color stating that ; is missing.But it is unable to do so.
I may have change something internally
What i need to do to work above issue
To fix this just disable the power saver mode and add the live edit plugin. When you disable the power saver mode it will automatically prompt in right bottom corner for installing the live edit plugin just click yes on it and restart your intellij, It will work as expected.