I wonder if there any way to make compiler's output in IntelliJ IDEA more verbose. IDEA automatically sets up compiler to ajc from maven dependencies.
I assume that it can be not IntelliJ IDEA's problem. May be ajc needs additional arguments ?
Thanks.
This message is rather from IDEA itself, not from Ajc.
AspectJ support in IDEA is still work-in-progress so it's better to use latest IDEA version (10.5 at the moment).
Please make sure that compiler is properly set up (File | Settings | Compiler | Java Compiler). Use "Test" button there.
Check IDEA logs for any related messages or exceptions.
If still no progress please file an issue to JetBrains tracker.
Still having this issue with 2019.1.
I found the log with the full exception in "~/.IntelliJIdea2019.1/system/log/build-log/build.log"
Related
Is there any way to fix ONLY unused imports in Rust automatically? I have seen cargo fix, which does work, but it makes a whole bunch of other fixes too. Is there any way to tell cargo fix to only fix unused imports (preferably in a specified file) and nothing else?
Side question: Is there any way to make IntelliJ do this? The usual shortcut (Cmd+Option+O) works in other languages, but for Rust, it just re-orders the imports.
According to this pull request, JetBrains' Rust plugin should be able to remove unused imports already but it is not enabled by default. According to this comment, it seems like the dev team need to wait until org.rust.macros.proc (currently an experimental feature disabled by default) to be enabled by default.
Individual lints are currently only configurable via attributes in your source code. There is no way to tell cargo check or cargo fix to ignore certain lint rules through the command line tool.
From my experience with JetBrains tools, it's unlikely that they'd use cargo fix under the hood anyway. They have built their own Rust tooling for parsing and analysing code, and that is where this feature would go.
I suggest submitting a feature request to JetBrains.
Enable Settings > Editor > Inspections > Rust > Lints > Unused Import.
Disable Enable inspection only if procedural macros are enabled in the same section.
Versions
IntelliJ IDEA Build #IU-223.7571.182
Rust Plugin 0.4.185.5086-223
I am working on a project using kotlinjs for nodejs and I start to learn coroutines and integrate them into my code to say goodbye to the callback hell.
I managed to get coroutines working, my code can be compiled and executed, everything seems fine.
...except: The IDE still shows me errors. It seems to be confused by the additional libraries I added in order to get coroutines running.
I am currently fiddling around with the library dependencies, sometimes some errors go away, but then some code gets red which was okay before...
This is what I see:
Case 1:
Cannot access class 'kotlinx.coroutines.experimental.CoroutineContext'. Check your module classpath for missing or conflicting dependencies
Case 2:
Unresolved reference: JsModule
Modifier 'external' is not applicable to 'class'
You see, launch is recognized when I add the stdlib, but then the IDE complains with the other two errors.
Again, please note: In both cases, actual compilation is successful!
I am using IntelliJ 2018.1 with Kotlin Plugin 1.2.41.
Thanks to Alexander Chernikov at youtrack.jetbrains I could resolve my problem.
I cite his explanation:
The issue is that JavaScript libraries should be marked with special attribute to be recognized.
When they are imported from pom.xml or build.gradle, this mark is set, so the feature works.
In your project they are not marked.
At the moment, to correct the libs manually, please open .idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_js_1_2_41.xml and .idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_js_0_22_5.xml.
In both files find type="repository" and replace it with type="kotlin.js".
Make sure IDEA sees the change. (You can exit IDEA, make the change and restart.)
Then you can keep only these two libs in dependencies. The editor should work.
Here is the issue link:
https://youtrack.jetbrains.com/issue/KT-24575
There I have also attached a sample project with the problem.
I have an issue with using Jrebel.
I am trying to build Dropwizard APIs in Intellij Idea.
Any change in method signature(eg name of parameter or additional parameters) does not reflect automatically in JRebel Build. Stop and Re-run will make it Fix.
Same problem in DAO class at annotated query( #SqlQuery(“any change here will make problems”) )
IDE:- Intellij Idea 13.0.1
Jrebel:- 5.5.0-idea13
Did you actually compile the code? JRebel doesn't build the code for you but relies on the compiler results. Well, if you're on IDEA 13, and the deployment is configured via artifacts, then you can configure IDEA to make the project automatically in Settings | Compiler | Make project automatically - then the IDE will make the project once you have made changes to the code, with some delay thoug (~1.5 seconds).
Second, make sure that rebel.xml is included into deployment.
For the problems with changes in SqlQuery annotation - the best you can do is to report such problem to the official JRebel support or to the forums.
I'm trying to run my android application on IntelliJ. I created a project from existing source, and I've attached the SDK correctly, everything runs ok until there, but when I try to run, it logs messages saying:
Error: MyClass.class (No such file or directory)
And this happens with all classes I've created.
Any idea of what might be happening? Maybe some settings I must set in the IDE.
Thanks.
Solved it! In intelliJ go in Settings > Compiler > Java Compiler and in the Use Compiler choose javac in-process (Java6+ only).
What are common causes for IntelliJ IDEA not being able to resolve built-in JVM types and methods? For example, when I mouse over String the tooltip says "Cannot resolve symbol 'String'". It's as if IntelliJ has doesn't know where the JVM is.
By the way, I am running OS X 10.6.6. Everything was working fine until I ran the system update this morning.
Most likely JDK configuration is not valid, try to remove and add the JDK again as I've described in the related question here.
First check if you have configured JDK correctly:
Go to File->Project Structure -> SDKs
your JDK home path should be something like this:
/Library/Java/JavaVirtualMachine/jdk.1.7.0_79.jdk/Contents/Home
Hit Apply and then OK
Secondly check if you have provided in path in Library's section
Go to File->Project Structure -> Libraries
Hit the + button
Add the path to your src folder
Hit Apply and then OK
This should fix the problem
I was facing the same problem when import projects into IntelliJ.
for in my case first, check SDK details and check you have configured JDK correctly or not.
Go to File-> Project Structure-> platform Settings-> SDKs
Check your JDK is correct or not.
Next, I Removed project from IntelliJ and delete all IntelliJ and IDE related files and folder from the project folder (.idea, .settings, .classpath, dependency-reduced-pom). Also, delete the target folder and re-import the project.
The above solution worked in my case.
For me, I had to remove the intellij internal sdk and started to use my local sdk. When I started to use the internal, the error was gone.
I tried almost everything but nothing was helping with the ibm jdk 1.8. to fix this issue. then I found an article from https://youtrack.jetbrains.com/issue/IDEA-279214/Cannot-resolve-symbol-String-when-using-IBM-JDK-180 and it worked like charm!!!
so sharing original help credit goes to #Serge Barano. incase anybody needs and not able to able to resolve the issue using previous solutions like me.
according to the article answer is:
IBM JDK has a weird layout and the jar with the String class is in bin directory for some reason:
d:\dev\ibm_sdk80\jre\bin\default\jclSC180\vm.jar
If you add it to the JDK classpath in IntelliJ IDEA, the issue should resolve:
For me, IntelliJ could autocomplete packages, but never seemed to admit there were actual classes at any level of the hierarchy. Neither re-choosing the SDK nor re-creating the project seemed to fix it.
What did fix it was to delete the per-user IDEA directory ( in my case ~/.IntelliJIdea2017.1/) which meant losing all my other customizations... But at least it made the issue go away.
First of all you should try File | Invalidate Caches and if it doesn't help, delete IDEA system directory. Then re-import the Maven project and see if it helps.
For me ,
File -> project structure -> Project Language Level (11) selection worked. Local variable syntax for lambda paramters.
In my case, cloning repo from the remote was the easiest way to solve this issue.