How is Groovy hot-swap agent "gragent.jar" is supposed to work in Intellij Idea? - intellij-idea

It seems doesn't add anything to the regular java hot-swapping. I'd like to get the groovy class hot-swapped in a case of method adding/removing/signature changing. Is it possible with this agent?

Dany's answer is correct, but doesn't answer the question fully. No, this agent doesn't help you to hot-swap when fields or methods are changed. You might want to consider using DCEVM for that.

Removes all timestamp-related Groovy fields on class loading
Also clears Groovy's call site cache
As stated in
https://github.com/JetBrains/intellij-community/blob/master/plugins/groovy/hotswap/agentSrc/org/groovy/debug/hotswap/ResetAgent.java

Related

how to access class with the internal keyword inside a third-party jar from kotlin?

Speak from technical standpoint of view, whether it is possible to access an internal class inside a third-party jar?
i have try out the '-Xfriend-paths', but it seems it does not support anything like
kotlinc -Xfriend-paths=xxxx.jar ...
Can any one point me some directions
It's impossible to access internal members (which is a good thing). See this discussion for more details.
You may have run into this Kotlin bug: https://youtrack.jetbrains.com/issue/KT-29933
Try again using an absolute path, or making sure that your Kotlin version is at least 1.3.70.

Disable automatically-generated comments in classes (backend editor)

Currently, I am "forced" to develop my reports with SE80 / SE24, etc. and I can't use eclipse. There I've seen that if you have the "Source Code-Based" view in Z-Classes, above every method the signature is shown as a comment. See in the following picture:
Well, I know that those comments are not really in the source code, but shown anyway (generated somehow).
Do you know a way how to disable those "comments"?
I find them unnecessary and I am losing the overview over the class. And instead of a 27-row implementation part of a class I've got an 88-row-long implementation part.
These signature comments are automatically generated by the SAP GUI based class editor reached through transactions SE24 and SE80.
Use the ABAP Development Tools to avoid them.
There's no way to disable those comments. I genereally prefer the form editor when forced to use SE80, I think it gives a better overview. The best would be if you were allowed to use Eclipse, but politics can be difficult to change.

Get the results of an (existing) code inspection

I am new to writing intellij plugins, so I apologize in advance if my question might be a bit unclear.
I know that (live) code inspections are achieved via Annotators or LocalInspectionTools. I also know there is an API to write a custom Annotator or Inspection tool and I have seen several examples.
What I do not know (my question): is there a manager/helper/"global inspector" that can provide me with the results of an existing code annotator/inspection process (done by the IDE's plugins or by some 3rd party plugin)?
For instance: I do not want to write a custom Lint annotator/inspection plugin for WebStorm. One can configure JSLint/JSHint inside WebStorm settings. The results of the live inspection can be seen over the current file/current open editor.
I would like to get the results of this live inspection, that occurs in the current open editor (inside my own custom code). For this I am interested in the API to get this annotator/inspector and/or the results it provides.
(I apologize for maybe using annotator and inspection terms in a confusing manner)
If there is another question (which I could not find) that duplicates what I have asked above, please re-direct me.
Thank you in advance!
Andrei.
Unfortunately regular annotating process for the linters is asynchronous so you cannot get the annotation results directly (by calling 'Manager' method).
You can create instances of JSLintInspection, JSHintInspection, etc. and call #createVisitor().visit(File) method but the operation is very slow and you must call it outside of AWT thread.
Also you can try to run the method com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerEx#processHighlights but as I mentioned above the annotation results for linters can be not available (or outdated)

Disable JRockit Optimzation per class

Is there anyway to do this? I have seen there is a -XnoOpt function, but that seems more global than only applying this to a particular class.
Any help would be useful ... even if to tell me this is not possible.
Thanks!
You can create an opt file, see
JRockit R28: http://docs.oracle.com/cd/E15289_01/doc.40/e15059/crash.htm#BABJGICB
Earlier releases: https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/crash.html#wp1010461

"Guess" method arguments in IntelliJ IDEA

Eclipse has a feature, where it "guesses" arguments for a method call, based on types (and probably variable names?). Is there an equivalent in IntelliJ? I know Smart Complete should be capable of completing multiple arguments, but it doesn't work as good (especially when there is more than one String argument for example).
EDIT: It's called "Insered best guessed arguments" in Eclipse.
There is Ctrl+Shift+Space (Smart-Type, I think), but as of this writing, it's crap and doesn't go the whole hog.
Despite being an Eclipse fan, I've always openly acknowledge that if Eclipse can do it, IntelliJ can probably do it better... not this time, how dissappointing q(`_`!)p
IDEA doesn't support it, see the related feature request.
Try
(Ctrl+P) for Windows/Linux
Or
(Cmd+P) for OS X
this lists you the parameters for a method.
If you can accept a very basic low tech version of this, you could try this Gist
https://gist.github.com/kontext-e/f68c6a1b90dd862afb5d
for IDEAs LivePlugin.
Please ping me if there is some interest that I should make a real plugin out of this.