I've recently upgraded to IntelliJ 11 and use it for writing both Java and Groovy.
When I adjust the Project Structure to include src/test/groovy as a Test Source, the setting takes initially.
After a short while, the setting is reverted and src/test/groovy displays as a normal file structure.
Searching around, in Settings > File Associations, *.groovy is indicated as a valid source file.
I've been using IntelliJ for a while, but I'm stumped on this one.
Thanks!
The answer for me turned out to be to correct any Project Structure appears reported by IntelliJ as mentioned above.
At some time I realized this problem would occur every time I changed a POM. To resolve it (at least for now...), under Settings > Maven > Importing, I checked "Keep source and test folder on reimport", and the situation appears to have resolved itself.
Related
I opened a folder in Android Studio which contains a Kotlin script file (.kts). I configured a JDK as SDK in Project Structure (but I added no gradle files), and running the file as Kotlin script works fine. However the syntax highlighting is only PARTIALLY working, see below example (Linux Mint 19.3 and AS 4.1.3):
Some of the stuff missing:
unused variable should be gray (val unused)
to/forEach keyword should be yellow and italic
misspelled variable names should be red
bad style such as extra spaces should be underlined
etc.
What's even going on here? Is this some sort of "fallback" mode?
Any way to use the "full" syntax highlighting from normal Android projects, so I can spot mistakes earlier?
For reference, this is what it "should" look like (pasted into a random Android project):
Renaming the file to end in *.main.kts (scriptname.main.kts) enabled full highlighting for me!
I get this type of issues from time to time with IntelliJ IDEA. I haven't found the reason why it happens, neither do I know the 100% working solution. But here are the options that usually help me solve it:
Restart IDE
Invalidating caches: File > Invalidate Caches...
Re-import the project. Remove the .idea folder and the project.iml file and try to import the project again.
Update the IDE. Last time I had this issue, nothing helped but updating IDEA to 2021.1.
I hope some of these options will help.
Trying j2me app development. I got a simple Hello to work, and a simple TextBox user as well. But when I tried to compile code for a file browser I got "javax.microedition.io.file does not exist".
The WTK according to the Sun website is supposed to include JSR75. And there's a camera demo .java file that uses it.
I've looked in various places (the WTK, BlueJ, even Netbeans) for menu options to turn it on. Nothing. And a search of this forum turned up exactly ONE message and it pertains to another IDE, and it seemed to work for him in BlueJ.
So what am I missing and how do I get it?
In NetBeans, you go to Project Properties (right-click the project, and select Properties). Then click "Platform" and mark "File Connection and PIM Optional Packages 1.0".
On a whim I did a search for JSR75 jar download and found a few zipped jar files that seemed to contain the file classes. I unzipped one of them and put it in the Libraries/Userlib directory of BlueJ; and now I seem to have the File... Classes. Reading and writing seem to work in the emulator.
I'll take another look at Netbeans when I get a chance.
Following some links here I tried to rename a project. I went to c:\path\to\AndroidStudioProject and renamed the folder there, then found the .idea file and changed that. Now the project loads but java files are missing! However, on clicking java (in the bar at the top), then com I can see them each with a small red j.
I then looked in module Gradle build where there were 3 files, one with the new name and 2 older ones which stated that they did not belong so I deleted them, copying the compile info into the new one. Naturally on doing a Sync Now I get a bunch of errors.
Why does this have to be such a complex operation? Can anyone assist?
After you rename the folder, open the project in Android Studio. From there, right click something that needs to be renamed (e.g., module, package names, etc.) and use Refactor->Rename from the context menu. Keep doing this until everything that can be refactored is.
You will need to manually change the value of applicationId in the app-level build.gradle. Obviously, things like #string/app_name will also have to be changed manually. I recommend making these manual adjustments from inside Android Studio rather than directly editing the files. That way you'll know immediately if you break something.
What can be wrong in my project properties if eclipse don't see headers I include ? I have good include paths, i can see them in window with includes hierarchy.
But in source editor there is problem :/
In properties I have good paths:
This problem came suddenly :/ Yesterday I could build my project without any problems, but now there is some problem :/ Project isn't under version control, so I can't revert to yesterday's source:/
Sometimes eclipse uses a different working directory that you expect, so you kind of have to play around with relative paths a little. Try putting a ../ In front of the directory, perhaps that will put it in scope, but I think that there is a way to find out the build directory other than guessing. Project -> properties -> C++ build and look around. Also, we can't help you much if you don't host is somewhere where we can download it... If you do that I promise you I will fix it and post the solution!
Content assist always shows "No Default Proposals" in one of my Java classes, but it works as expected elsewhere in the project/workspace. It worked at one point in that file too, but stopped working for no reason that I can see.
I'm using Eclipse Classic 3.7.1, Java 6 update 30. My settings are the default in Java -> Editor -> Content Assist -> Advanced. I've tried to clean/rebuild project. I also tried removing and re-adding the class.
Try deleting all index database files in your workspace directory
.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/
and restart Eclipse. Also close/reopen the file in question.