https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
intellij-plugins
  • a

    Afzal Najam

    10/21/2020, 1:40 AM
    New to creating plugins. Trying to like a color display in gutter for a kotlin file. Is the java PSI api going to work for a Kotlin file, and if not, where do I get the kotlin PSI dependency? (I've started with the github template for plugins) I'm unable to import PsiIdentifier 😕
    m
    • 2
    • 2
  • a

    Afzal Najam

    10/23/2020, 5:07 AM
    Is there a way to get the return type of a
    KotlinUFunctionCallExpression
    (or
    PsiMethod
    ) if the return type is an inline class? When I do this:
    (uElement as KotlinUFunctionCallExpression).resolve().returnType
    I just get
    PsiType:long
    but the class is
    inline class Color(val color: Long) {
    
    }
    When I remove the inline keyword, I get the real name of the class.
    • 1
    • 1
  • j

    Jakub Neukirch

    10/29/2020, 8:02 AM
    Hi which action id corresponds to "Show Context Actions" ? it is shortcut alt+enter on windows and option + enter on Mac. I Would like to add an action which generates some code based on missing function call
    d
    • 2
    • 1
  • s

    samuel

    10/31/2020, 9:52 PM
    hi, i am trying to create a plugin that would modify primary constructor parameters of a class or data class (group vars and vals together). I am however stuck in how to proceed. By using the intellij PSI structure viewer, i can see the format and structure of the constructor and by using
    classOrObject.getPrimaryConstructorParameterList()?.parameters
    i can see the parameters. I am not sure how to go about actually doing the modification though, It doesn’t seem possible to directly modify the class after accessing the parameters. Could some one help nudge me in the right direction?
    m
    • 2
    • 1
  • j

    Jakub Neukirch

    11/13/2020, 6:59 PM
    How can I run Gradle project import in my plugin? And how can I run any Gradle Task? Documentation doesn't mention too much about it or I am looking for it very poorly
    • 1
    • 2
  • m

    Md Sajid Shahriar

    12/01/2020, 5:13 PM
    I’m currently developing a plugin for android studio. I’ve added this config to add plugins in build.gradle.kts
    intellij {
        pluginName = "MyPlugin"
        version = "201.8743.12"
        type = "IC"
        setPlugins("java", "android", "org.jetbrains.kotlin:1.4.20-release-Studio4.1-1")
    }
    and these depends tags in plugin.xml
    <depends>com.intellij.modules.lang</depends>
    <depends>com.intellij.modules.java</depends>
    <depends>org.jetbrains.android</depends>
    <depends>org.jetbrains.kotlin</depends>
    Whenever I’m trying to build the plugin, I’m getting the following error messages.
    The Kotlin (id=org.jetbrains.kotlin, path=~/Projects/AndroidStudioPlugin/build/idea-sandbox/plugins/Kotlin, version=1.4.20-release-Studio4.1-1) plugin requires "com.intellij.modules.androidstudio" plugin to be installed
    
      The Android (id=org.jetbrains.android, path=~/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/201.8743.12/da9095e6ac3581f0463f7ae0ebb155647ca427ad/ideaIC-201.8743.12/plugins/android) plugin requires "Kotlin" plugin to be enabled
    
      The MyPlugin (id=com.plugin.studio.myplugin, path=~/Projects/AndroidStudioPlugin/build/idea-sandbox/plugins/AndroidStudioPlugin, version=1.0-SNAPSHOT) plugin requires "Android" plugin to be enabled
    
      The MyPlugin (id=com.plugin.studio.myplugin, path=~/Projects/AndroidStudioPlugin/build/idea-sandbox/plugins/AndroidStudioPlugin, version=1.0-SNAPSHOT) plugin requires "Kotlin" plugin to be enabled
    Though the plugin is created successfully and can be install but I fear it might be broken. I also added the following line but same error message. Although adding the following line is marked as error by the IDE.
    <depends>com.intellij.modules.androidstudio</depends>
    h
    • 2
    • 1
  • s

    scana

    01/12/2021, 11:10 AM
    Hi everybody - I have developed an IntelliJ plugin which allows to easily search and add dependencies to build.gradle and build.gradle.kts plugins - https://github.com/scana/ok-gradle (also available in Plugins section in your IDE) Posting it here as somebody might find it useful from plugin development perspective (it took me a long time to figure out some stuff when I started developing this)
    • 1
    • 2
  • s

    samuel

    03/28/2021, 1:06 PM
    I’m trying to run a gradle task e.g 
    clean
     directly from my plugin like this
    GradleExecuteTaskAction.runGradle(
                project,
                DefaultRunExecutor.getRunExecutorInstance(),
                project.basePath!!,
                "clean"
            )
    This executes the task but requires that the plugin window is closed first, is there a way to allow this task to run even while the plugin window is actively visible?
    • 1
    • 1
  • k

    Ky

    04/21/2021, 7:02 PM
    Does anyone use projector plugin?
    i
    • 2
    • 1
  • s

    Skolson5903

    06/28/2021, 5:04 PM
    Hey all, I'm unsure where to ask this. I just upgraded to the 1.5.20 plugin in Android Studio, and now a gradle sync attempt of a project that used to sync fails with this (from idea.log). Has anyone else seen this?
    2021-06-28 09:49:46,152 [1139676]  ERROR - intellij.openapi.progress.Task - null
    java.lang.NullPointerException
    at com.intellij.workspaceModel.ide.impl.legacyBridge.library.LibraryModifiableModelBridgeImpl$setKind$1.invoke(LibraryModifiableModelBridgeImpl.kt:280)
    at com.intellij.workspaceModel.ide.impl.legacyBridge.library.LibraryModifiableModelBridgeImpl$setKind$1.invoke(LibraryModifiableModelBridgeImpl.kt:29)
    at com.intellij.workspaceModel.storage.impl.WorkspaceEntityStorageBuilderImpl.modifyEntity(WorkspaceEntityStorageImpl.kt:124)
    at com.intellij.workspaceModel.ide.impl.legacyBridge.library.LibraryModifiableModelBridgeImpl.updateProperties(LibraryModifiableModelBridgeImpl.kt:130)
    at com.intellij.workspaceModel.ide.impl.legacyBridge.library.LibraryModifiableModelBridgeImpl.setKind(LibraryModifiableModelBridgeImpl.kt:279)
    at org.jetbrains.kotlin.idea.configuration.KotlinGradleLibraryDataService.postProcess(KotlinGradleSourceSetDataService.kt:194)
    at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.lambda$doImportData$1(ProjectDataManagerImpl.java:276)
    at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:126)
    at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:206)
    at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:213)
    at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.populateProject(IdeaSyncPopulateProjectTask.java:53)
    at com.android.tools.idea.gradle.project.sync.idea.ProjectSetUpTask.doPopulateProject(ProjectSetUpTask.java:54)
    at com.android.tools.idea.gradle.project.sync.idea.ProjectSetUpTask.onSuccess(ProjectSetUpTask.java:48)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.handExecutionResult(ExternalSystemUtil.java:584)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.executeImpl(ExternalSystemUtil.java:564)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.lambda$execute$1(ExternalSystemUtil.java:389)
    at com.intellij.openapi.project.DumbServiceHeavyActivities.suspendIndexingAndRun(DumbServiceHeavyActivities.java:21)
    at com.intellij.openapi.project.DumbServiceImpl.suspendIndexingAndRun(DumbServiceImpl.java:185)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:389)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4.run(ExternalSystemUtil.java:666)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:962)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:472)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)
    2021-06-28 09:49:46,153 [1139677]  ERROR - intellij.openapi.progress.Task - Android Studio Arctic Fox | 2020.3.1 Beta 4  Build #AI-203.7717.56.2031.7435690
    2021-06-28 09:49:46,153 [1139677]  ERROR - intellij.openapi.progress.Task - JDK: 11.0.10; VM: OpenJDK 64-Bit Server VM; Vendor: Oracle Corporation
    2021-06-28 09:49:46,153 [1139677]  ERROR - intellij.openapi.progress.Task - OS: Windows 10
    2021-06-28 09:49:46,153 [1139677]  ERROR - intellij.openapi.progress.Task - Plugin to blame: Kotlin version: 203-1.5.20-release-289-AS7717.8
    2021-06-28 09:49:46,153 [1139677]  ERROR - intellij.openapi.progress.Task - Last Action: EditorDelete
    2021-06-28 09:49:46,257 [1139781]   INFO - cState$SyncStateUpdaterService - stopTrackingTask(RESOLVE_PROJECT:1)
    2021-06-28 09:49:46,257 [1139781]   WARN - e.project.sync.GradleSyncState - Gradle sync failed: Sync failed: reason unknown (50 s 270 ms)
    p
    • 2
    • 11
  • c

    Colton Idle

    07/12/2021, 9:53 PM
    How can one create a "toast" in an intellij plugin like you see here
    g
    • 2
    • 3
  • c

    chansek

    07/31/2021, 1:00 PM
    Decompiler tool of my IDE is not working. Here is my code which I want to decompile:
    data class FetchOrdersState(
        val orders: List<Order> = listOf(),
        val isLoading: Boolean = false,
        val error: String = ""
    ) : OrderState {
        companion object {
            val Empty = FetchOrdersState()
        }
    }
    g
    • 2
    • 1
  • c

    caelum19

    09/21/2021, 2:42 PM
    Hey, does anyone have any idea how I can get my plugin to use oAuth with a third party provider without having them to type their password for that third party provider? Ideally, a browser can be opened to a backend service, but I'd need to create a custom protocol handler and I'm wondering if there are examples anyone is aware of that another plugin has used for that? Is there a way to pass information to the plugin through an existing intelliJ protocol handler?
    👍 1
    • 1
    • 1
  • g

    galex

    01/05/2022, 3:05 PM
    What template engine did you use in your intellij plugin? My goal is to generate code and I find it easier to write it in template files
    a
    • 2
    • 2
  • m

    Marc

    03/21/2022, 3:32 PM
    anyone knows what is the kotlin equivalent to
    PsiPolyadicExpression
    in java?
    d
    • 2
    • 2
  • r

    Ruben Quadros

    04/23/2022, 7:22 AM
    Hi guys, can you please tell me how I can disable a file from being inspected in my plugin? Basically I have 2 actions one is
    Ignore
    and other is
    Fix
    . On clicking
    Ignore
    I do not want the file to be inspected anymore.
    d
    • 2
    • 2
  • g

    galex

    04/29/2022, 10:07 AM
    Hello, is there a way to use Jetpack Compose Desktop instead of Swing for building UI in IntelliJ ? 😄
    h
    c
    • 3
    • 11
  • r

    Ruben Quadros

    05/01/2022, 7:30 PM
    Hi guys, tried developing my custom code inspection plugin and I want to share it in an article. It would be great if any of you can proof read it if you have any time. Thanks in advance! Link in thread
    • 1
    • 1
  • e

    elect

    06/17/2022, 7:49 AM
    I'd like to have a typing-time error whenever I don't specify DSL parameters marked as mandatory (via an annotation), like this one (unfortunately Android-only). I tried with a static analyzer (detekt) but it looks this comes into play only when you manually compile the code. Someone mentioned also Arrow-meta (but I didn't get a clear answer on that). So my next though was an Idea Plugin. On the docs page, though, it's suggested that an Idea plugin may be overkill and to look at the alternative approaches, which are: • Structural Search and Replace Inspections • IDE Scripting Console • Flora Plugin • Live Plugin • PhpStorm Advanced Metadata Now, I don't know any of these, so I'd like to ask to anyone experienced in these fields which approach would be the right one for my case without being overkill
    d
    • 2
    • 3
  • j

    Jakub Neukirch

    07/07/2022, 6:03 AM
    Hi, I have written article to encourage more people trying creating their own Intellij Plugins, what do you think? https://blog.stonks.tech/intellij-plugin-development/
    👍 2
    d
    • 2
    • 1
  • h

    hfhbd

    07/08/2022, 8:04 AM
    Hey, what is the behavior of DefaultLanguageHighlighterColors? I created a key with
    createTextAttributesKey("FUNCTIONS", DefaultLanguageHighlighterColors.FUNCTION_CALL))
    , and the token returns this key, but the syntax highlighter is still text:
    FUNCTIONS (fallbackKey: DEFAULT_FUNCTION_CALL (fallbackKey: DEFAULT_IDENTIFIER (fallbackKey: TEXT)))
    .
  • m

    Marc

    08/04/2022, 11:45 AM
    Does anyone know some place to see the table with each coroutine version bundled by intellij version?
  • g

    galex

    08/08/2022, 8:16 AM
    Hello, while building a language parser, can I somehow extract it to its own submodule and build a jar out of it ?
  • j

    Jerry Yion

    08/09/2022, 3:39 AM
    and
  • j

    Jerry Yion

    08/09/2022, 3:39 AM
    if I want to create a new idea plugin project
  • m

    Marc

    08/11/2022, 7:03 PM
    you can actually use the jetbrains plugin template and forget about this step 🙂
  • t

    tevjef

    08/13/2022, 6:16 PM
    I have a problem where I’m writing some in-perfect code using the Editor but the indentation is all off. Is there a way to run formatting on the current Document?
    • 1
    • 1
  • j

    Jerry Yion

    08/21/2022, 10:52 AM
    Hi there, quick question: How can I save some temp files during my plugins running
  • c

    Cody Mikol

    08/26/2022, 3:01 PM
    Does anyone know how to get the fully qualified package name for a KtNameReferenceExpression?
  • a

    Artur Bosch

    09/09/2022, 9:18 AM
    Hi, is it okay to use for example the package
    org.apache.http
    of the 3rd-party.jar in my custom plugin or is it discouraged to do so ?
Powered by Linen
Title
a

Artur Bosch

09/09/2022, 9:18 AM
Hi, is it okay to use for example the package
org.apache.http
of the 3rd-party.jar in my custom plugin or is it discouraged to do so ?
View count: 7