IntelliJ IDEA 14.1.0 (Ultimate edition)
Java 1.8, 1.6
Scala 2.11
We are working on a project which has several modules most of them are Java and one of the modules is in scala.
For some odd reason IDE becomes non editable (i.e) I can't modify any files, though I can click and navigate between files.
Its so annoying that we've to restart the whole IDE or mutilple IDEs in case we have multiple projects opened on different IDE windows.
I have seen this, I think its due to accidentally changing the edit mode,
at the bottom right corner there is a small lock icon, if you click that it will toggle readonly and editable.
For me, it was the accidentally turned on Vim emulator (found the answer here). Untick Tools -> Vim Emulator.
Here's the image from the original thread:
Related
I used Eclipse Java last year for a class, and this year I have another class that's requiring us to use Eclipse C. I tried installing the Eclipse C/C++ packages, but when I write in Eclipse it stays in Java. Please help!!!
Also, I don't really want to uninstall Eclipse if I don't have to, because I'm still actively working on projects.
You've basically downloaded 2 "modes" in Eclipse: Java mode, and C/C++ mode. If you type and it assumes it's Java, that's because the project you created is in "Java mode".
First, just quit out of the app and open it again. Maybe the update only enacts when the app is refreshed.
Now go File > New. If it's installed correctly, when you hover over "New", there should be the option "C/C++ Project". If there isn't, double check that you downloaded the correct extension. (Note that I'm on a Mac so the layout might be slightly different for you, but it's the same idea).
Intellij doesn't show run button even if that file is in src folder.
Maybe do you know what to do?
P. s. It's strange because that file used to show run button but after recloning git repository it just doesn't show any more.
Right click on src directory and select option Mark Directory As > Sources Root.
There is an Intellij bug that will result to an intermittent disappearance of that little tiny green run button on the left side of the source code (on same column where the red circle breakpoints are). Yes, you can right-click on the mouse and can do the run via the menu, BUT we love that tiny green button so bring it back!! From time to time, i see this green friend and then suddenly it vanish mysteriously and comes back again. I did all, such as rm -rf .idea and other weird stuff, but no explanation has ever been achieved to explain the vanishing green button and it's sudden re-appearance intermittently.
I am drafting this answer, because all of the above answers seems to claim that there is a logical explanation of the intermittent disappearance of our little green friend and that a sequence of steps exists to make our little green friend re-appear, when in fact, there is no such steps and we just have to accept this is a bug to save the remaining hairs in our scalp.
In my case Run/Debug buttons disappeared for all projects after updating from IDEA 2019.2 to 2019.3. Tried checking Sources Root, Invalidate Caches, Run/Debug configurations etc - no luck. Only restoring Run/Debug action group helped:
Right click on main toolbar (where the button disappeared) > Customize Menus and Toolbars... > select Run/Debug > Restore Run/Debug.
I got the same problem with intellij 2019.3 and 2020.1 and found the solution here : https://youtrack.jetbrains.com/issue/IDEA-228180.
Basically, in the IDE the buttons run/debug and the error detection in the code were missing.
The fix was to disable the plugin 'Gradle' (I don't need it anyway) :
Settings > Plugins > Gradle and click disable and apply.
After restarting your IDE it should work
I had this issue when building a microservice with SpringBoot.
I added a new microservice into the root folder and I could not run it.I am using Maven.
Step:
Open pom.xml
right click and select "Add as maven project"
It should resolve it immediately but you can reload the IDE if it does not update immediately.
IDE: Idea 2021.2.3
Build tool: Gradle
I removed the .idea and reimported the project from the Gradle source. Worked fine after.
Another reason could be the Highlighting Level set to None, it should be set at least to Syntax.
First, make the folder as source root.
Second, make sure you set the project’s sdk correctly. For example, if you set the sdk correctly then import java.util.Scanner can be analyzed by IDEA.
Tip:
try not setting the SDK to IDEA’s bundled JDK. I set the project’s SDK to JDK 11 bundled by IDEA at first then found it couldn’t resolve import java.util.Scanner. Setting to JDK 16 which is installed by the OS’s package manager solved this problem, then the “run” button showed up.
If IDEA can index a java file then the file icon will show with a small “c”, indicating a java class. If not, the file icon will show with a small “j”, as this problem’s image shows, indicating a java file which IDEA doesn’t index.
In my case there was a plugin (springboot helper) which I had to disable.
Reinstall the IDE, it solved my problem.
I also applied all these methods but it still didn't work so I stopped my window firewall and allowed access for this application. I don't know how it worked out for me but it just got displayed on top of my screen that window defender firewall has stopped some of this app's features and there was an option to allow so I clicked on it and it now works just fine.
The "other java proposals" that allows you to use the Ctrl+Space shortcut is missing from my Kempler install. I have redownloaded and reinstalled fresh from Eclipse and still do not have access to the shortcut from "other java proposals".
When searching here it's been suggested it should be checked in the advanced section of the editor preferences for Java. I can't find anything about how to enable to disable it here or in the Eclipse help files so I thought I would ask.
Thanks,
Omega
Kepler doesn't have "Other java proposals" but just Java Proposals.
This option (or Java Proposals (Task-Focused)) is sometimes left unchecked when importing the project to Kepler from a workspace on an older version of eclipse. Hence, your problem might be with workspace than the eclipse dist you are using.
I just thought I would "answer" this question incase someone else had the same problem.
It turns out that Synergy+ uses the same keystroke to lock screens. Even when it's closed, and the service is still running it holds on to key binds.
So, how I fixed it was to go through task manager and kill processes one at a time until I was able to use the shortcut, then went in to Synergy and changed the keybind.
I'm using GGTS to create some projects in Grails but this IDE is terribly slow.
I have two projects in my IDE (sometimes both running) and after small changes GGTS starts to build workspace which takes A LOT of time, sometimes it never ends and just crashes, sometimes it makes so hard deadlock that I MUST restart my computer.
My environment: win 7 64-bit, Intel i5-2500 3,30GHz, 8GB RAM, GGTS v. 3.1.0, java 1.6.0_30, grails 2.2.0.
I've read that there is possible to do something like this:
Window - > Preferences - > General -> Workspace - > Linked Resource - Disable linked resource,
but I'm not sure if I can do this, cause Grails projects are connected with this place, I believe: C:\Users\username.grails\2.2.0\projects
What can I do? Is the only way out this problem is buying IntelliJ or working with some text editor and console? How to repair this buggy Eclipse?
Go to Project->uncheck the "Build Automatically" option. This is by default checked. So, when ever you do any change in the code, it automatically tries to build every time. Unchecking this option will save you a lot of time, as you can run it whenever you want (it builds only when you run the code.)
I use emacs for Grails development, but I would definitely recommend IntelliJ, unless you can work without code assist.
From what I've seen Eclipse with plugins, STS or GGTS are extremely buggy when working with Grails:
Workspace corruptions
Poor completion for dynamic methods
Sometimes you can't save files
etc.
Putting this: -vm
C:\devsw\java\jdk7_67\jre\bin\server\jvm.dll in my GGTS.ini (and restarting GGTS) has stopped the blue circle from spinning.
For some reason, the mouse cursor in Eclipse is disappearing.
I can see that I am able to move on the next line and it shows me via the usual color changes, but the cursor itself is not visible. When I start eclipse, I can see the cursor but once the initialization is complete, the cursor is hidden again.
The same thing happened when I switched from Eclipse Indigo to Juno and other versions. I do not know what to do.
Any pointers on what might be wrong ?
Anuj, try whether one of the following usual suspects fixes the problem :
Change to a new workspace and check whether the problem re-appears there.
If it does not re-appear, then you are dealing with a corrupt workspace. Would a whole lot be lost if you began with a new workspace ?
If it does, then it's probably a rowdy Eclipse plugin. The next logical step would be a fresh Eclipse install (I would recommend Eclipse Indigo for Java Devs downloadable from here)
If the problem persists with a brand new Eclipse + new workspace, then we'll need to widen our hunt and include OS / JDK problems. And while we are on that, which OS , JDK and Eclipse version are you using ?
Backing up a 'working' Eclipse setup
Once the problem has been fixed (for example by doing a Fresh Eclipse install) I would highly recommend backing up the following :
The Eclipse Installation directory (so that you get all the plugins you installed)
Workspace directory.
That ways you can restore a working version of your setup with minimal effort.