Intellij doesn't show compile time error - ide

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.

Related

How to see output from multiple File Watchers in JetBrains IDE

I'm using JetBrains GoLand IDE however I assume the answer would be common for any JetBrains IDE such as IntelliJ etc.
I've configured file watchers for:
go fmt, golint and go test
go fmt does not have output so it works fine.
golint and go test both have output. If I enable just one of them I see that output. If I enable both I see the output of golint for only a split second then it is replaced by the output of go test So I will never actually be able to read the output of golint
For now I solved this by making go test only display output on error, if it errors I figure I do not yet care about the output of golint but thought I'd ask anyway.
You don't need to enable go test as a File Watcher as the default test runner can execute on file changes.
To enable this feature, you can enable the Toggle test auto-rerun feature, which is the third button from top to bottom on the left side of the run test window. You can also configure the interval after which the tests run via the cog wheel.
Here's a reference for how to do this in IntelliJ IDEA, which is the same as in GoLand https://twitter.com/intellijidea/status/807239309992591361?lang=en
Known issue, please vote for WEB-14387 to be notified on any progress with it

WebStorm stop popping up output Run window in LiveEdit mode

I am developing using WebStorm and its plugin LiveEdit.
So as I start changing some SCSS code, it starts to recompile all files and outputs an error, because I am still typing.
But the most irritating thing is that Run output is popping up each time it compiles with an error and this makes my IDE to jump up and down, sometimes overlaying line of code is being edited.
So my question is it possible to disable autopopup of Run output ? Or maybe any other ways to hide this window. I can set longer delay, but this still won't solve the problem.
Reposting #LazyOne comment on the question as a working answer:
Go to Preference > Tools > File Watchers
Select your watcher (most likely it will be Babel)
Click on the Edit (pencil) icon in the bottom
In the File Watcher window click on Show Console and set it to Never: Example - link
Click Ok and save

Can't type in IntelliJ

I'm using IntelliJ IDEA on my Mac to work on a project, and I keep on coming across an issue where I can't type. Occasionally when I switch to another application and then switch back to IntelliJ I can't type anything, and the cursor doesn't appear on text when I click on things. Does anyone know what causes this? After 1-2 minutes it goes back to normal, but it's started happening more frequently and it's pretty frustrating to not be able to type and have no way to fix it.
This is the version of IntelliJ I'm using:
IntelliJ IDEA 2016.1.3
Build #IC-145.1617, built on June 3, 2016
JRE: 1.8.0_76-release-b198 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Turn off Vim Emulator from Tools in the IntelliJ, like this picture:
I am encountering this issue aswell, ...
MAC os Mojave 10.14.2, Inteliij Community 2018.3.5
Aside from restarting / clearing caches, I found that cmd + leftShift + F still opens the search window, and all my keystrokes appeared in the searchbox!
After the searchshortcut, I was able to close the searchbox and work again!
The answer here helped me https://intellij-support.jetbrains.com/hc/en-us/community/posts/206152119-Can-t-type-in-editor-window
Quoting the author of the answer:
I had the same problem. It goes away after I click the icon at top of
the scroll bar. it happens frequently on windows 7/10, and
occasionally on mac. my colleagues said they have experienced it too
Have the same issue occasionally, can't type in any Intellij windows. My temporary/quick fix, is to:
Close any terminal windows in intellij
Use cmd+shift+f to pull up the search window.
Seems to fix it, for a while.
Closed IDEA, all IDEA projects! Even though in other IDEA windows I could type.
Removed .idea folder in the project I could not edit.
Restarted IDEA.
Then I was able to type!
Maybe you entered Vim emulator as said. Maybe only by mistake :).
Control-V is a frequently used shortcut. And Control-Alt_V is the shortcut to enable Vim mode so you can see the problem...
How to know in five seconds: type a ":" (colon) and if the cursor jump to end of the screen, that is vim. If so enter q to quit and then Control-Alt-V (on windows) to go back to IDEA standard mode.
vi is a powerful text editor since ever. But only if you pretend and know how to use it... There is even a warning on the IDEA install saying like "do not install unless you are familiar with Vim" in yellow bold text, iirc.
[Follows historic data, that you may find boring off-topic or interesting]
Today's editors opens the code in edit mode right away so you can start typing over existing code. Vim by the other hand opens the code in, let us say, browsing mode: there is a set of navigation keys to browse the code. Everything you type is supposed to be a command. When you want to edit you enter INSERT mode and then you can type new text. Only then.
Just for more historic data: vi navigation mode is great for studying code you do not know, using IDEA, since it does not change the text unless you tell it to, and some vi commands are clever.
One example:
"/" (forward slash) is one search command, and "z" is a smart scroll command so that:
/setCellFactory will search for the next match of "setCellFactory" and put the cursor there
Then if you type "z" the code will be positioned so that line is the first on screen. And if you type "." the line will be at the middle. And if you type "-" that line will be at the last position at the screen. And you can use these commands again and again. And new slash will go for the next match, like F3
This "z" thing is a feature I miss in Visual Studio, IDEA, Eclipse, Word, WordPad: these commands to scroll text AROUND a pattern... /pattern, z, z., z-. The alternative is the mouse wheel...
I am used to vi since the 80's and is the editor I still use today on Linux terminals so when this happened to me on IDEA I was lucky to remember and suspect of that on the first time.
Sorry if these details are boring
Ensure you haven't unintentionally enabled vim emulation. Go to IntelliJ Idea -> Preferences and select Plugins. Scroll down and look for the vim emulation plugin and if it's checked, then either uncheck it or uninstall it completely.
Ran into same issue with intelliJ 2017.1.2, but no VIM Plugin. However, I had just created an empty project with some .groovy files. I could edit the files in the groovy project, but not java projects.
Only way I could fix java projects, was blow-away workspace.xml files in each, then I could edit again. However, had to re-create tomcat configs, breakpoints, other IDE settings. etc.
I had a problem with entering characters when working with .story files. When I tried to type in any character, it appeared for a short while and immediately disappeared. The cause of the problem was jbehave plugin I was using. After uninstalling it and restarting IntelliJ everything was fine.
It seems to be because another window has the cursor and is not giving it back.
Check any open floated windows, click on them & then click back to your intellij instance
alternatively, if you have multiple intellij instances open the cursor could be there...
Go to the most recently opened IntelliJ instance
Check if the cursor has become stuck in that project's terminal window, or another window
no? check all other open IntelliJ instances
For me it happened because of vim
Om Mac, I solved it by navigating to File → Reload All from Disk.
Keyboard shortcut: ⌥ ⌘ Y
IntelliJ IDEA 2020.1.4
Try disabling plugins one at a time. It was the "BashSupport Pro" plugin that caused it for me. Disabled it and I could type again right away.
I read other comments saying some other plugins caused the issue as well.

unable to set breakpoint in intellij

I am trying to set breakpoints, nothing happens for couple of classes that I compiled recently with "mvn install". I am able to set breakpoints to classes which were already built by someone else.
Please let me know if anyone knows how to solve it.
Had the same issue while using IDEA CE 15:
Removing the Python CE plugin 5.0.143.103 fixed the issue... but no Python parsing! :(
File -> Invalidate Caches and Restart helped solve the problem. Thanks Tomasz Nurkiewicz for the directions
In my case, the issue was caused by PHP Plugin (https://plugins.jetbrains.com/plugin/?id=6610). Even after "Invalidate Caches and Restart", the issue persisted.
Uninstalling that PHP plugin, solved my problem.
By nothing happens do you mean that breakpoint isn't hit? Take a closer look at breakpoint icon. Especially see the difference between
and
icons. The latter indicates the code you run while debugging doesn't have any meaningful instruction on that line.
One of the reasons for such behaviour is when code you run is not the code you see. It can happen when application server can is still running old JAR or something similar. This seems to be the case since you say that breakpoints work in older code.
The solution to fixing breakpoints was adding the wildcard file extension "*.py" to the Python File Types in Python (it must have the wildcard symbol prefix, not just ".py") through taking these steps:
Go to:
IntelliJ IDE > Preferences (CMD+,) > Editor > File Types > Recognized
File Types
Under "Recognized File Types" heading:
Scroll down; Select "Python"
(associated Registered Patterns will be shown below)
Under "Registered Patterns" heading:
Click "+" icon; Enter "*.py", Click OK
(do whatever is necessary to achieve this, including removing/renaming others without the wildcard if necessary)
Add breakpoints by:
Select line(s) of code (not an empty line or comment); Going to: Run >
Toggle Line Breakpoint (CMD+F8)
Configure debugging with breakpoints by going to:
Run > Edit Configurations...; Click "+"; Select "Python"; Add a value
for the "Name" property; Select location of the ".py" file to debug
(in the "Script" property); Click OK
Debug using the breakpoints by going to:
Run > Debug... (Fn+CMD+F9); Wait until it stops at a breakpoint;
Inspect variable values shown in the file itself by hovering over
variable; Click variables and view the Frame and Variable details in
the Debug window by going to: View > Tool Windows > Debug (CMD+5)
Important Note: Initially I tried doing the following but after each one I was still unable to use breakpoints afterward:
Removing and reinstalling the Python plugin:
Entering CMD+,; In the dialog window going to Plugins > Install
Jetbrains Plugin.. > "Python" > Install
Updating IntelliJ Ultimate edition to the latest version v2016.3.4
Going to:
File > Invalidate Caches and Restart
Right click on the gutter (where you normally click to set breakpoint)
select "Configure Gutter Icons..." then enable the checkbox at the top that says
"Show gutter icons"
That fixed it for me
Simply closing and reopening file worked in setting gutter breakpoints
This is embarrassing but posting here in case this solution will help somebody else: A breakpoint will not show up if you attempt to place it between executable lines of code. The breakpoint must be located on an executable line of code to work. Make sure you click on the gutter next to an executable line or place your cursor on an executable line when you use the shortcut. Once I did this, the breakpoints worked.
"Click the gutter at the executable line of code where you want to set the breakpoint." https://www.jetbrains.com/help/idea/using-breakpoints.html#set-breakpoints

IntelliJ - show where errors are

Is there a way to make IntelliJ mark error locations continuously for the files you are working on in the similar manner as Eclipse does? At the moment I need to make the project which lists all the errors in the message panel, but even then I cannot navigate to them using the editor panel. I would like to have simple dots/markers which would point to error/warning locations.
IntelliJ IDEA detects errors and warnings in the current file on the fly (unless Power Save Mode is activated in the File menu).
Errors in other files and in the project view will be shown after Build | Make and listed in the Messages tool window.
For Bazel users: Project errors will show on Bazel Problems tool window after running Compile Project (Ctrl/Cmd+F9)
To navigate between errors use Navigate | Next Highlighted Error (F2) / Previous Highlighted Error (Shift+F2).
Error Stripe Mark color can be changed here:
For those who even yet have the problem, try enabling "Build project automatically" in the Java compiler settings and see if that makes a difference as it worked for me.
I ran into the problem of not having set my sources root folder (project window--right click folder, mark directory as > sources root). If you don't set this IDEA doesn't parse the file.
For IntelliJ 2017:
Use "Problem" tool window to see all errors.
This window appears in bottom/side tabs when you enable "automatic" build/make as mentioned by #pavan above (https://stackoverflow.com/a/45556424/828062).
To access this Problems panel, you must set your project to build automatically. Check the box for Preferences/Settings > Build, Execution, Deployment > Compiler > Build project automatically.
Frankly the errors are really hard to see, especially if only one character is "underwaved" in a sea of Java code. I used the instructions above to make the background an orangey-red color and things are much more obvious.
In IntelliJ Idea 2019 you can find scope "Problems" under the "Project" view. Default scope is "Project".
Besides, you can choose going to next error only (ignore warning) by:
Right click the Validation Side Bar.
On the context menu, choose the Go to high priority problems only
it works for Intellij Idea 12
In my case, I unknowingly unchecked 'Error Stripe Mark' option (Idea 2018.2: Settings > Editor > Color Scheme > General and expand `Error and Warnings' & click 'Error').
Fix is to check 'Error Stripe Mark' option of 'Error' (as highlighted in the below image). Now you will see the error marks in scrollbar area.
In my case, IntelliJ was simply in power safe mode
Do you have a yellow icon like this [_] at the bottom of the main window?
It is a "type-aware highlighting" switch which could be disabled accidentally.
You should re-enable it by clicking on the icon.
In the intellij hit ctrl+alt+shift+s and go to global libraries and click on plus icon to add the java libraries this will solve your problem. now you will see the errors coming up
enter image description here
This is the solution I found:
Open IntelliJ Setting (Crtl + Shift + A);
Click in "Editor";
Click in "Color Scheme" + the Programming Language (inside "Color Scheme");
Select "Analysis Error";
Select "Error stripe mark" + Add the Color desired