How to achieve the effect of Inlay hint on the list above each function, separating and triggering by clicking?
已计划
Desired:
This implementation effect is very unique. It's like a list implementation, where each one can be clicked and separated, but it's also like a drawing. You can directly click on it and enter the function in one go. The experience is very good。
Implemented by oneself:
Now I can only achieve the effect of one icon, and when clicked, there will be a popMeun that needs to be clicked twice. The display is not as good as before, to select functions, what solutions are available, etc. Thank you!
My Code:
请先登录再写评论。
Could you please share your implementation source code that results in
AFAIU the sample code adds only one element per
PsiMethod
.Oh, thank you. I'm glad I've achieved this effect, but now it can only be recognized for use on Java language, not Python. Is there any solution
plugin.xml
code-python.xml
build.gradle
plugins {
id 'org.jetbrains.intellij' version '1.17.4'
}
repositories {
mavenLocal()
maven {
allowInsecureProtocol = true
url "http://maven.aliyun.com/nexus/content/groups/public/"
}
}
dependencies {
implementation 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
implementation 'com.google.guava:guava:33.2.0-jre'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation 'cn.hutool:hutool-all:5.8.27'
implementation 'com.alibaba.fastjson2:fastjson2:2.0.49'
implementation 'org.apache.commons:commons-text:1.12.0'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'com.vladsch.flexmark:flexmark-all:0.64.8'
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
intellij {
version.set("2024.1.1")
type.set("IC")
plugins.set(['java'])
}
patchPluginXml {
changeNotes = """
Add change notes here.<br>
<em>most HTML tags may be used</em>"""
sinceBuild.set("223")
untilBuild.set("243")
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
I tried to change build.gradle and add Python, but encountered an error
Please follow guide from https://plugins.jetbrains.com/docs/intellij/pycharm.html
Also `java` is wrong plugin ID, see https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html#java
https://plugins.jetbrains.com/docs/intellij/pycharm.html.。The Java ID has been changed, this URL cannot be accessed, 404
I have looked at your configuration, where did it go wrong
build.gradle
plugins {
id 'org.jetbrains.intellij' version '1.17.4'
}
repositories {
mavenLocal()
maven {
allowInsecureProtocol = true
url "http://maven.aliyun.com/nexus/content/groups/public/"
}
}
dependencies {
implementation 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
implementation 'com.google.guava:guava:33.2.0-jre'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation 'cn.hutool:hutool-all:5.8.27'
implementation 'com.alibaba.fastjson2:fastjson2:2.0.49'
implementation 'org.apache.commons:commons-text:1.12.0'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'com.vladsch.flexmark:flexmark-all:0.64.8'
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
intellij {
version.set("2024.1.1")
type.set("PC")
plugins.set(["PythonCore"])
downloadSources.set(false)
}
patchPluginXml {
changeNotes = """
Add change notes here.<br>
<em>most HTML tags may be used</em>"""
sinceBuild.set("223")
untilBuild.set("243")
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
ERROE
Execution failed for task ':instrumentCode'.
> taskdef class com.intellij.ant.InstrumentIdeaExtensions cannot be found
* Try:
> Get more help at https://help.gradle.org.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':instrumentCode'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:130)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:128)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:116)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
Hello, Yann Cebron,thank you. The above issue has been resolved, but one problem has been found. If the type is set to CL, it is possible to import Clion and Python, but if IU is set, it will fail
success
plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.17.4'
}
intellij {
version.set("2024.1.1")
type.set("CL")
plugins.set(["PythonCore","com.intellij.clion"])
downloadSources.set(false)
}
error
intellij {
version.set("2024.1.1")
type.set("IU")
plugins.set(["PythonCore","com.intellij.clion"])
downloadSources.set(false)
}
org.gradle.tooling.BuildException: Cannot find builtin plugin 'PythonCore' for IDE:
I hope to receive help, thank you!
Sorry the links were broken, fixed.
You cannot mix all IDEs and plugins in one module, as they're simply not compatible and do not contain the same set of bundled plugins. You'll need to extract functionality targeting such IDEs into a separate module only targeting this specific IDE, and then combine all modules into your final plugin.
Hello, Yann Cebron,thank you. You'll need to extract functionality targeting such IDEs into a separate module only targeting this specific IDE, and then combine all modules into your final plugin.How is this sentence implemented? Can you give a simple example? Thank you
See https://github.com/intellij-rust/intellij-rust plugin as a sample
Okay, thank you. Yann Cebron.I would like to ask if there is a Csharp plugin ID for importing modules
intellij {
version.set("2024.1.1")
type.set("RD")
downloadSources.set(false)
}
No plugin to add in Gradle, in
plugin.xml
use<depends>com.intellij.modules.rider</depends>
Okay, thank you, it's resolved